<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
  <meta name="theme-color" content="#222">
  <meta name="generator" content="Hexo 4.2.1">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/safari-pinned-tab.svg" color="#222">
  <link rel="stylesheet" href="/css/main.css">
  <link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">
  <link rel="stylesheet" href="/lib/pace/pace-theme-minimal.min.css">
  <script src="/lib/pace/pace.min.js"></script>
  <script id="hexo-configurations">
    var NexT = window.NexT ||
    {};
    var CONFIG = {
      "hostname": "cuiqingcai.com",
      "root": "/",
      "scheme": "Pisces",
      "version": "7.8.0",
      "exturl": false,
      "sidebar":
      {
        "position": "right",
        "width": 360,
        "display": "post",
        "padding": 18,
        "offset": 12,
        "onmobile": false,
        "widgets": [
          {
            "type": "image",
            "name": "阿布云",
            "enable": false,
            "url": "https://www.abuyun.com/http-proxy/introduce.html",
            "src": "https://qiniu.cuiqingcai.com/88au8.jpg",
            "width": "100%"
      },
          {
            "type": "image",
            "name": "天验",
            "enable": true,
            "url": "https://tutorial.lengyue.video/?coupon=12ef4b1a-a3db-11ea-bb37-0242ac130002_cqx_850",
            "src": "https://qiniu.cuiqingcai.com/bco2a.png",
            "width": "100%"
      },
          {
            "type": "image",
            "name": "华为云",
            "enable": false,
            "url": "https://activity.huaweicloud.com/2020_618_promotion/index.html?bpName=5f9f98a29e2c40b780c1793086f29fe2&bindType=1&salesID=wangyubei",
            "src": "https://qiniu.cuiqingcai.com/y42ik.jpg",
            "width": "100%"
      },
          {
            "type": "image",
            "name": "张小鸡",
            "enable": false,
            "url": "http://www.zxiaoji.com/",
            "src": "https://qiniu.cuiqingcai.com/fm72f.png",
            "width": "100%"
      },
          {
            "type": "image",
            "name": "Luminati",
            "src": "https://qiniu.cuiqingcai.com/ikkq9.jpg",
            "url": "https://luminati-china.io/?affiliate=ref_5fbbaaa9647883f5c6f77095",
            "width": "100%",
            "enable": false
      },
          {
            "type": "image",
            "name": "IPIDEA",
            "url": "http://www.ipidea.net/?utm-source=cqc&utm-keyword=?cqc",
            "src": "https://qiniu.cuiqingcai.com/0ywun.png",
            "width": "100%",
            "enable": true
      },
          {
            "type": "tags",
            "name": "标签云",
            "enable": true
      },
          {
            "type": "categories",
            "name": "分类",
            "enable": true
      },
          {
            "type": "friends",
            "name": "友情链接",
            "enable": true
      },
          {
            "type": "hot",
            "name": "猜你喜欢",
            "enable": true
      }]
      },
      "copycode":
      {
        "enable": true,
        "show_result": true,
        "style": "mac"
      },
      "back2top":
      {
        "enable": true,
        "sidebar": false,
        "scrollpercent": true
      },
      "bookmark":
      {
        "enable": false,
        "color": "#222",
        "save": "auto"
      },
      "fancybox": false,
      "mediumzoom": false,
      "lazyload": false,
      "pangu": true,
      "comments":
      {
        "style": "tabs",
        "active": "gitalk",
        "storage": true,
        "lazyload": false,
        "nav": null,
        "activeClass": "gitalk"
      },
      "algolia":
      {
        "hits":
        {
          "per_page": 10
        },
        "labels":
        {
          "input_placeholder": "Search for Posts",
          "hits_empty": "We didn't find any results for the search: ${query}",
          "hits_stats": "${hits} results found in ${time} ms"
        }
      },
      "localsearch":
      {
        "enable": true,
        "trigger": "auto",
        "top_n_per_article": 10,
        "unescape": false,
        "preload": false
      },
      "motion":
      {
        "enable": false,
        "async": false,
        "transition":
        {
          "post_block": "bounceDownIn",
          "post_header": "slideDownIn",
          "post_body": "slideDownIn",
          "coll_header": "slideLeftIn",
          "sidebar": "slideUpIn"
        }
      },
      "path": "search.xml"
    };

  </script>
  <meta name="description" content="崔庆才的个人站点，记录生活的瞬间，分享学习的心得。">
  <meta property="og:type" content="website">
  <meta property="og:title" content="静觅">
  <meta property="og:url" content="https://cuiqingcai.com/index.html">
  <meta property="og:site_name" content="静觅">
  <meta property="og:description" content="崔庆才的个人站点，记录生活的瞬间，分享学习的心得。">
  <meta property="og:locale" content="zh_CN">
  <meta property="article:author" content="崔庆才">
  <meta property="article:tag" content="崔庆才">
  <meta property="article:tag" content="静觅">
  <meta property="article:tag" content="PHP">
  <meta property="article:tag" content="Java">
  <meta property="article:tag" content="Python">
  <meta property="article:tag" content="Spider">
  <meta property="article:tag" content="爬虫">
  <meta property="article:tag" content="Web">
  <meta property="article:tag" content="Kubernetes">
  <meta property="article:tag" content="深度学习">
  <meta property="article:tag" content="机器学习">
  <meta property="article:tag" content="数据分析">
  <meta property="article:tag" content="网络">
  <meta property="article:tag" content="IT">
  <meta property="article:tag" content="技术">
  <meta property="article:tag" content="博客">
  <meta name="twitter:card" content="summary">
  <link rel="canonical" href="https://cuiqingcai.com/">
  <script id="page-configurations">
    // https://hexo.io/docs/variables.html
    CONFIG.page = {
      sidebar: "",
      isHome: true,
      isPost: false,
      lang: 'zh-CN'
    };

  </script>
  <title>静觅丨崔庆才的个人站点</title>
  <meta name="google-site-verification" content="p_bIcnvirkFzG2dYKuNDivKD8-STet5W7D-01woA2fc" />
  <noscript>
    <style>
      .use-motion .brand,
      .use-motion .menu-item,
      .sidebar-inner,
      .use-motion .post-block,
      .use-motion .pagination,
      .use-motion .comments,
      .use-motion .post-header,
      .use-motion .post-body,
      .use-motion .collection-header
      {
        opacity: initial;
      }

      .use-motion .site-title,
      .use-motion .site-subtitle
      {
        opacity: initial;
        top: initial;
      }

      .use-motion .logo-line-before i
      {
        left: initial;
      }

      .use-motion .logo-line-after i
      {
        right: initial;
      }

    </style>
  </noscript>
  <link rel="alternate" href="/atom.xml" title="静觅" type="application/atom+xml">
</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container">
    <div class="headband"></div>
    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner">
        <div class="site-brand-container">
          <div class="site-nav-toggle">
            <div class="toggle" aria-label="切换导航栏">
              <span class="toggle-line toggle-line-first"></span>
              <span class="toggle-line toggle-line-middle"></span>
              <span class="toggle-line toggle-line-last"></span>
            </div>
          </div>
          <div class="site-meta">
            <a href="/" class="brand" rel="start">
              <span class="logo-line-before"><i></i></span>
              <h1 class="site-title">静觅 <span class="site-subtitle"> 崔庆才的个人站点 </span>
              </h1>
              <span class="logo-line-after"><i></i></span>
            </a>
          </div>
          <div class="site-nav-right">
            <div class="toggle popup-trigger">
              <i class="fa fa-search fa-fw fa-lg"></i>
            </div>
          </div>
        </div>
        <nav class="site-nav">
          <ul id="menu" class="main-menu menu">
            <li class="menu-item menu-item-home">
              <a href="/" rel="section">首页</a>
            </li>
            <li class="menu-item menu-item-archives">
              <a href="/archives/" rel="section">文章列表</a>
            </li>
            <li class="menu-item menu-item-tags">
              <a href="/tags/" rel="section">文章标签</a>
            </li>
            <li class="menu-item menu-item-categories">
              <a href="/categories/" rel="section">文章分类</a>
            </li>
            <li class="menu-item menu-item-about">
              <a href="/about/" rel="section">关于博主</a>
            </li>
            <li class="menu-item menu-item-message">
              <a href="/message/" rel="section">给我留言</a>
            </li>
            <li class="menu-item menu-item-search">
              <a role="button" class="popup-trigger">搜索 </a>
            </li>
          </ul>
        </nav>
        <div class="search-pop-overlay">
          <div class="popup search-popup">
            <div class="search-header">
              <span class="search-icon">
                <i class="fa fa-search"></i>
              </span>
              <div class="search-input-container">
                <input autocomplete="off" autocapitalize="off" placeholder="搜索..." spellcheck="false" type="search" class="search-input">
              </div>
              <span class="popup-btn-close">
                <i class="fa fa-times-circle"></i>
              </span>
            </div>
            <div id="search-result">
              <div id="no-result">
                <i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>
              </div>
            </div>
          </div>
        </div>
      </div>
    </header>
    <div class="back-to-top">
      <i class="fa fa-arrow-up"></i>
      <span>0%</span>
    </div>
    <div class="reading-progress-bar"></div>
    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div class="content index posts-expand">
            <div class="carousel">
              <div id="wowslider-container">
                <div class="ws_images">
                  <ul>
                    <li><a target="_blank" href="https://cuiqingcai.com/5052.html"><img title="Python3网络爬虫开发实战教程" src="https://qiniu.cuiqingcai.com/ipy96.jpg" /></a></li>
                    <li><a target="_blank" href="https://t.lagou.com/fRCBRsRCSN6FA"><img title="52讲轻松搞定网络爬虫" src="https://qiniu.cuiqingcai.com/fqq5e.png" /></a></li>
                    <li><a target="_blank" href="https://brightdata.grsm.io/cuiqingcai"><img title="亮网络解锁器" src="https://qiniu.cuiqingcai.com/6qnb7.png" /></a></li>
                    <li><a target="_blank" href="https://cuiqingcai.com/4320.html"><img title="Python3网络爬虫开发视频教程" src="https://qiniu.cuiqingcai.com/bjrny.jpg" /></a></li>
                    <li><a target="_blank" href="https://cuiqingcai.com/5094.html"><img title="爬虫代理哪家强？十大付费代理详细对比评测出炉！" src="https://qiniu.cuiqingcai.com/nifs6.jpg" /></a></li>
                  </ul>
                </div>
                <div class="ws_thumbs">
                  <div>
                    <a target="_blank" href="#"><img src="https://qiniu.cuiqingcai.com/ipy96.jpg" /></a>
                    <a target="_blank" href="#"><img src="https://qiniu.cuiqingcai.com/fqq5e.png" /></a>
                    <a target="_blank" href="#"><img src="https://qiniu.cuiqingcai.com/6qnb7.png" /></a>
                    <a target="_blank" href="#"><img src="https://qiniu.cuiqingcai.com/bjrny.jpg" /></a>
                    <a target="_blank" href="#"><img src="https://qiniu.cuiqingcai.com/nifs6.jpg" /></a>
                  </div>
                </div>
                <div class="ws_shadow"></div>
              </div>
            </div>
            <link rel="stylesheet" href="/lib/wowslide/slide.css">
            <script src="/lib/wowslide/jquery.min.js"></script>
            <script src="/lib/wowslide/slider.js"></script>
            <script>
              jQuery("#wowslider-container").wowSlider(
              {
                effect: "cube",
                prev: "",
                next: "",
                duration: 20 * 100,
                delay: 20 * 100,
                width: 716,
                height: 297,
                autoPlay: true,
                playPause: true,
                stopOnHover: false,
                loop: false,
                bullets: 0,
                caption: true,
                captionEffect: "slide",
                controls: true,
                onBeforeStep: 0,
                images: 0
              });

            </script>
            <article itemscope itemtype="http://schema.org/Article" class="post-block index" lang="zh-CN">
              <link itemprop="mainEntityOfPage" href="https://cuiqingcai.com/33045.html">
              <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
                <meta itemprop="image" content="/images/avatar.png">
                <meta itemprop="name" content="崔庆才">
                <meta itemprop="description" content="崔庆才的个人站点，记录生活的瞬间，分享学习的心得。">
              </span>
              <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
                <meta itemprop="name" content="静觅">
              </span>
              <header class="post-header">
                <h2 class="post-title" itemprop="name headline">
                  <a class="label"> 安装配置 <i class="label-arrow"></i>
                  </a>
                  <a href="/33045.html" class="post-title-link" itemprop="url">Pika 的安装</a>
                </h2>
              </header>
              <div class="post-body" itemprop="articleBody">
                <div class="thumb">
                  <img itemprop="contentUrl" class="random">
                </div>
                <div class="excerpt">
                  <p>
                  <p>Pika 是 Python 中用于连接和操作 RabbitMQ 的库，本节我们了解下 Pika 的安装方式。</p>
                  <h2 id="相关链接"><a href="#相关链接" class="headerlink" title="相关链接"></a>相关链接</h2>
                  <ul>
                    <li>官方文档：<a href="https://pika.readthedocs.io" target="_blank" rel="noopener">https://pika.readthedocs.io</a></li>
                    <li>GitHub：<a href="https://github.com/pika/pika" target="_blank" rel="noopener">https://github.com/pika/pika</a></li>
                  </ul>
                  <h2 id="先置条件"><a href="#先置条件" class="headerlink" title="先置条件"></a>先置条件</h2>
                  <p>安装之前请先安装下 RabbitMQ，安装参考说明：<a href="https://setup.scrape.center/rabbitmq" target="_blank" rel="noopener">https://setup.scrape.center/rabbitmq</a>。</p>
                  <h2 id="安装方法"><a href="#安装方法" class="headerlink" title="安装方法"></a>安装方法</h2>
                  <h3 id="pip-安装"><a href="#pip-安装" class="headerlink" title="pip 安装"></a>pip 安装</h3>
                  <p>推荐使用 pip3 安装，命令如下：</p>
                  <figure class="highlight cmake">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">pip3 <span class="keyword">install</span> pika</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>命令执行完毕之后即可完成安装。</p>
                  <h2 id="验证安装"><a href="#验证安装" class="headerlink" title="验证安装"></a>验证安装</h2>
                  <p>安装完成之后，可以在 Python 命令行下测试。</p>
                  <figure class="highlight python">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br><span class="line">2</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">$ python3</span><br><span class="line"><span class="meta">&gt;&gt;&gt; </span><span class="keyword">import</span> pika</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>如果没有错误报出，则证明库已经安装好了。</p>
                  </p>
                </div>
              </div>
              <div class="post-meta">
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-user"></i>
                  </span>
                  <span class="post-meta-item-text">作者</span>
                  <span><a href="/authors/崔庆才" class="author" itemprop="url" rel="index">崔庆才</a></span>
                </span>
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-calendar"></i>
                  </span>
                  <span class="post-meta-item-text">发表于</span>
                  <time title="创建时间：2021-12-03 07:39:41" itemprop="dateCreated datePublished" datetime="2021-12-03T07:39:41+08:00">2021-12-03</time>
                </span>
                <span id="/33045.html" class="post-meta-item leancloud_visitors" data-flag-title="Pika 的安装" title="阅读次数">
                  <span class="post-meta-item-icon">
                    <i class="fa fa-eye"></i>
                  </span>
                  <span class="post-meta-item-text">阅读次数：</span>
                  <span class="leancloud-visitors-count"></span>
                </span>
                <span class="post-meta-item" title="本文字数">
                  <span class="post-meta-item-icon">
                    <i class="far fa-file-word"></i>
                  </span>
                  <span class="post-meta-item-text">本文字数：</span>
                  <span>319</span>
                </span>
                <span class="post-meta-item" title="阅读时长">
                  <span class="post-meta-item-icon">
                    <i class="far fa-clock"></i>
                  </span>
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                  <span>1 分钟</span>
                </span>
              </div>
            </article>
            <article itemscope itemtype="http://schema.org/Article" class="post-block index" lang="zh-CN">
              <link itemprop="mainEntityOfPage" href="https://cuiqingcai.com/33044.html">
              <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
                <meta itemprop="image" content="/images/avatar.png">
                <meta itemprop="name" content="崔庆才">
                <meta itemprop="description" content="崔庆才的个人站点，记录生活的瞬间，分享学习的心得。">
              </span>
              <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
                <meta itemprop="name" content="静觅">
              </span>
              <header class="post-header">
                <h2 class="post-title" itemprop="name headline">
                  <a class="label"> 安装配置 <i class="label-arrow"></i>
                  </a>
                  <a href="/33044.html" class="post-title-link" itemprop="url">RabbitMQ 的安装</a>
                </h2>
              </header>
              <div class="post-body" itemprop="articleBody">
                <div class="thumb">
                  <img itemprop="contentUrl" class="random">
                </div>
                <div class="excerpt">
                  <p>
                  <p>RabbmitMQ 是一个非常强大易用的消息队列，支持 Windows、Mac、Linux 等各个平台。</p>
                  <p>每个平台都有多种安装方式，这里进行简单归纳总结，具体的安装方式请移步官方文档说明。</p>
                  <h2 id="Windows-上的安装"><a href="#Windows-上的安装" class="headerlink" title="Windows 上的安装"></a>Windows 上的安装</h2>
                  <p>Windows 主要有两种安装方式，一种是通过 Chocolatey 工具安装，另一种是通过官方安装包安装。</p>
                  <p>详细说明请移步：<a href="https://rabbitmq.com/install-windows.html" target="_blank" rel="noopener">https://rabbitmq.com/install-windows.html</a> 查看。</p>
                  <h3 id="Chocolatey"><a href="#Chocolatey" class="headerlink" title="Chocolatey"></a>Chocolatey</h3>
                  <p>Chocolatey 是一个 Windows 上管理软件的工具，RabbitMQ 发布了很多 Chocolatey 安装包，具体说明可以参考：<a href="https://rabbitmq.com/install-windows.html#chocolatey" target="_blank" rel="noopener">https://rabbitmq.com/install-windows.html#chocolatey</a>。</p>
                  <h3 id="官方安装包"><a href="#官方安装包" class="headerlink" title="官方安装包"></a>官方安装包</h3>
                  <p>就是下载一个二进制安装文件，具体的最新下载地址请移步 <a href="https://rabbitmq.com/install-windows.html#installer" target="_blank" rel="noopener">https://rabbitmq.com/install-windows.html#installer</a> 查看。</p>
                  <h2 id="Linux-上的安装"><a href="#Linux-上的安装" class="headerlink" title="Linux 上的安装"></a>Linux 上的安装</h2>
                  <p>Linux 上的安装方式又分了多种了，根据发行平台的不同有如下安装说明。</p>
                  <h3 id="Debian-和-Ubuntu"><a href="#Debian-和-Ubuntu" class="headerlink" title="Debian 和 Ubuntu"></a>Debian 和 Ubuntu</h3>
                  <p>请移步：<a href="https://rabbitmq.com/install-debian.html" target="_blank" rel="noopener">https://rabbitmq.com/install-debian.html</a> 查看。</p>
                  <h3 id="RedHat-Enterprise-Linux-CentOS-Fedora-openSUSE"><a href="#RedHat-Enterprise-Linux-CentOS-Fedora-openSUSE" class="headerlink" title="RedHat Enterprise Linux, CentOS, Fedora, openSUSE"></a>RedHat Enterprise Linux, CentOS, Fedora, openSUSE</h3>
                  <p>请移步：<a href="https://rabbitmq.com/install-rpm.html" target="_blank" rel="noopener">https://rabbitmq.com/install-rpm.html</a> 查看。</p>
                  <h2 id="Mac"><a href="#Mac" class="headerlink" title="Mac"></a>Mac</h2>
                  <p>Mac 就是主要用 Homebrew 来安装了，具体安装说明请移步：<a href="https://rabbitmq.com/install-homebrew.html" target="_blank" rel="noopener">https://rabbitmq.com/install-homebrew.html</a>。</p>
                  <h2 id="更多"><a href="#更多" class="headerlink" title="更多"></a>更多</h2>
                  <p>更多平台的安装方式请移步：<a href="https://rabbitmq.com/download.html" target="_blank" rel="noopener">https://rabbitmq.com/download.html</a> 查看。</p>
                  </p>
                </div>
              </div>
              <div class="post-meta">
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-user"></i>
                  </span>
                  <span class="post-meta-item-text">作者</span>
                  <span><a href="/authors/崔庆才" class="author" itemprop="url" rel="index">崔庆才</a></span>
                </span>
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-calendar"></i>
                  </span>
                  <span class="post-meta-item-text">发表于</span>
                  <time title="创建时间：2021-12-03 07:39:41" itemprop="dateCreated datePublished" datetime="2021-12-03T07:39:41+08:00">2021-12-03</time>
                </span>
                <span id="/33044.html" class="post-meta-item leancloud_visitors" data-flag-title="RabbitMQ 的安装" title="阅读次数">
                  <span class="post-meta-item-icon">
                    <i class="fa fa-eye"></i>
                  </span>
                  <span class="post-meta-item-text">阅读次数：</span>
                  <span class="leancloud-visitors-count"></span>
                </span>
                <span class="post-meta-item" title="本文字数">
                  <span class="post-meta-item-icon">
                    <i class="far fa-file-word"></i>
                  </span>
                  <span class="post-meta-item-text">本文字数：</span>
                  <span>738</span>
                </span>
                <span class="post-meta-item" title="阅读时长">
                  <span class="post-meta-item-icon">
                    <i class="far fa-clock"></i>
                  </span>
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                  <span>1 分钟</span>
                </span>
              </div>
            </article>
            <article itemscope itemtype="http://schema.org/Article" class="post-block index" lang="zh-CN">
              <link itemprop="mainEntityOfPage" href="https://cuiqingcai.com/33043.html">
              <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
                <meta itemprop="image" content="/images/avatar.png">
                <meta itemprop="name" content="崔庆才">
                <meta itemprop="description" content="崔庆才的个人站点，记录生活的瞬间，分享学习的心得。">
              </span>
              <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
                <meta itemprop="name" content="静觅">
              </span>
              <header class="post-header">
                <h2 class="post-title" itemprop="name headline">
                  <a class="label"> 安装配置 <i class="label-arrow"></i>
                  </a>
                  <a href="/33043.html" class="post-title-link" itemprop="url">Selenium 的安装</a>
                </h2>
              </header>
              <div class="post-body" itemprop="articleBody">
                <div class="thumb">
                  <img itemprop="contentUrl" class="random">
                </div>
                <div class="excerpt">
                  <p>
                  <p>Selenium 是一个自动化测试工具，利用它我们可以驱动浏览器执行特定的动作，如点击、下拉等等操作，对于一些 JavaScript 渲染的页面来说，此种抓取方式非常有效，下面我们来看下 Selenium 的安装过程。</p>
                  <h2 id="相关链接"><a href="#相关链接" class="headerlink" title="相关链接"></a>相关链接</h2>
                  <ul>
                    <li>官方网站：<a href="http://www.seleniumhq.org" target="_blank" rel="noopener">http://www.seleniumhq.org</a></li>
                    <li>GitHub：<a href="https://github.com/SeleniumHQ/selenium/tree/master/py" target="_blank" rel="noopener">https://github.com/SeleniumHQ/selenium/tree/master/py</a></li>
                    <li>PyPi：<a href="https://pypi.python.org/pypi/selenium" target="_blank" rel="noopener">https://pypi.python.org/pypi/selenium</a></li>
                    <li>官方文档：<a href="http://selenium-python.readthedocs.io" target="_blank" rel="noopener">http://selenium-python.readthedocs.io</a></li>
                    <li>中文文档：<a href="http://selenium-python-zh.readthedocs.io" target="_blank" rel="noopener">http://selenium-python-zh.readthedocs.io</a></li>
                  </ul>
                  <h2 id="ChromeDriver-安装"><a href="#ChromeDriver-安装" class="headerlink" title="ChromeDriver 安装"></a>ChromeDriver 安装</h2>
                  <p>通常来说，我们需要配合 Chrome 浏览器使用 Selenium，所以我们还需要额外安装下 ChromeDriver 和 Chrome 浏览器。</p>
                  <p>安装参考：<a href="https://setup.scrape.center/chromedriver" target="_blank" rel="noopener">https://setup.scrape.center/chromedriver</a>。</p>
                  <h2 id="安装"><a href="#安装" class="headerlink" title="安装"></a>安装</h2>
                  <h3 id="pip-安装"><a href="#pip-安装" class="headerlink" title="pip 安装"></a>pip 安装</h3>
                  <p>推荐直接使用 pip3 安装，执行如下命令即可：</p>
                  <figure class="highlight cmake">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">pip3 <span class="keyword">install</span> selenium</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <h3 id="wheel-安装"><a href="#wheel-安装" class="headerlink" title="wheel 安装"></a>wheel 安装</h3>
                  <p>除了 pip 安装，也可以到 PyPi 下载对应的 wheel 文件进行安装，<a href="https://pypi.python.org/pypi/selenium/#downloads" target="_blank" rel="noopener">https://pypi.python.org/pypi/selenium/#downloads</a>, 如假设最新版本为 3.4.3，则下载 selenium-3.4.3-py2.py3-none-any.whl。</p>
                  <p>然后进入 wheel 文件目录，使用 pip 安装。</p>
                  <figure class="highlight css">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line"><span class="selector-tag">pip3</span> <span class="selector-tag">install</span> <span class="selector-tag">selenium-3</span><span class="selector-class">.4</span><span class="selector-class">.3-py2</span><span class="selector-class">.py3-none-any</span><span class="selector-class">.whl</span></span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <h2 id="验证安装"><a href="#验证安装" class="headerlink" title="验证安装"></a>验证安装</h2>
                  <p>进入 Python 命令行交互模式，导入一下 Selenium 包，如果没有报错，则证明安装成功。</p>
                  <figure class="highlight ruby">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br><span class="line">2</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">$ python3</span><br><span class="line"><span class="meta">&gt;&gt;</span>&gt; import selenium</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>当然也可以运行一个脚本：</p>
                  <figure class="highlight python">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line"><span class="keyword">from</span> selenium <span class="keyword">import</span> webdriver</span><br><span class="line"><span class="keyword">from</span> time <span class="keyword">import</span> sleep</span><br><span class="line"></span><br><span class="line">browser = webdriver.Chrome()</span><br><span class="line">browser.get(<span class="string">'https://www.baidu.com'</span>)</span><br><span class="line">sleep(<span class="number">2</span>)</span><br><span class="line">browser.close()</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>如果运行完毕之后弹出来了一个 Chrome 浏览器并加载了百度页面，2 秒之后就关闭了，那就证明没问题了。</p>
                  </p>
                </div>
              </div>
              <div class="post-meta">
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-user"></i>
                  </span>
                  <span class="post-meta-item-text">作者</span>
                  <span><a href="/authors/崔庆才" class="author" itemprop="url" rel="index">崔庆才</a></span>
                </span>
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-calendar"></i>
                  </span>
                  <span class="post-meta-item-text">发表于</span>
                  <time title="创建时间：2021-12-03 05:39:41" itemprop="dateCreated datePublished" datetime="2021-12-03T05:39:41+08:00">2021-12-03</time>
                </span>
                <span id="/33043.html" class="post-meta-item leancloud_visitors" data-flag-title="Selenium 的安装" title="阅读次数">
                  <span class="post-meta-item-icon">
                    <i class="fa fa-eye"></i>
                  </span>
                  <span class="post-meta-item-text">阅读次数：</span>
                  <span class="leancloud-visitors-count"></span>
                </span>
                <span class="post-meta-item" title="本文字数">
                  <span class="post-meta-item-icon">
                    <i class="far fa-file-word"></i>
                  </span>
                  <span class="post-meta-item-text">本文字数：</span>
                  <span>998</span>
                </span>
                <span class="post-meta-item" title="阅读时长">
                  <span class="post-meta-item-icon">
                    <i class="far fa-clock"></i>
                  </span>
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                  <span>1 分钟</span>
                </span>
              </div>
            </article>
            <article itemscope itemtype="http://schema.org/Article" class="post-block index" lang="zh-CN">
              <link itemprop="mainEntityOfPage" href="https://cuiqingcai.com/31116.html">
              <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
                <meta itemprop="image" content="/images/avatar.png">
                <meta itemprop="name" content="崔庆才">
                <meta itemprop="description" content="崔庆才的个人站点，记录生活的瞬间，分享学习的心得。">
              </span>
              <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
                <meta itemprop="name" content="静觅">
              </span>
              <header class="post-header">
                <h2 class="post-title" itemprop="name headline">
                  <a class="label"> Python <i class="label-arrow"></i>
                  </a>
                  <a href="/31116.html" class="post-title-link" itemprop="url">《Python3网络爬虫开发实战（第二版）》终终终终于来了！！！！</a>
                </h2>
              </header>
              <div class="post-body" itemprop="articleBody">
                <div class="thumb">
                  <img itemprop="contentUrl" class="random">
                </div>
                <div class="excerpt">
                  <p>
                  <p>大家好！我是崔庆才。</p>
                  <p>今天告诉大家一个好消息：《Python3网络爬虫开发实战（第二版）》上架了！！！！</p>
                  <p>没错，就是这本：</p>
                  <p><img src="https://qiniu.cuiqingcai.com/bpxgw.png" alt=""></p>
                  <p>2018 年 5 月我的《Python3网络爬虫开发实战》的第一版出版了，从上市到现在三年多销量约 10w 册，真的非常感谢各位读者的支持。后来，由于一些技术更迭，我开始策划编写本书的第二版。</p>
                  <p>2021 年11月，这本书历经各种反复修改、审稿等阶段，到今天终于上架了！</p>
                  <p>这几个月我收到了太多读者的询问，第二版什么时候出来，真的抱歉实在是让大家久等了。</p>
                  <p>没错，就是今天，它来了！</p>
                  <h2 id="第二版更新内容"><a href="#第二版更新内容" class="headerlink" title="第二版更新内容"></a>第二版更新内容</h2>
                  <p>大家第一个问题可能就会问，第二版比第一版更新了哪些内容？</p>
                  <p>因为技术总是在不断发展和进步的，爬虫技术也是一样，它在爬虫和反爬虫不断斗争的过程中也在不断演进。比如现在越来越多的网页采取了各种防护措施，比如前端代码的压缩和混淆、API 的参数加密、WebDriver 的检测，要做到高效的数据爬取，我们就需要懂得一些 JavaScript 逆向分析相关技术。App 也是一样，App 的抓包防护、加壳保护、Native 化、风控检测使得越来越多的 App 数据难以爬取，所以我们也不得不了解一些逆向相关技术，如 Xposed、Frida、IDA Pro 等工具的使用。除此之外，近几年深度学习和人工智能发展得也是如火如荼，所以爬虫也可以和人工智能结合起来，比如基于深度学习的验证码识别、网页内容的智能化解析和提取等技术我们也可以进行学习和了解。另外，一些大规模爬虫的管理和运维技术也在不断发展，当前 Kubernetes、Docker、Prometheus 等云原生技术也非常火爆，基于 Kubernetes 等云原生技术的爬虫管理和运维解决方案也已经很受青睐。然而，之前第一版书对以上提到的这些新兴技术几乎没有提及。</p>
                  <p>除此之外，第一版书在讲解数据爬取的过程中引用了很多案例和服务，比如猫眼电影网站、淘宝网站、代理服务网站，然而几年过去了，有些案例网站和服务早已经改版或者停止维护，这就导致第一版书中的很多案例已经不能正常运行了。这其实是一个很大的问题，因为程序运行不通会大大降低学习的积极性和成就感，而且会浪费不少时间。另外，即使案例对应的爬虫代码及时更新了，那我们也不知道这些案例网站和服务什么时候会再次改版，因为这都是不可控的。所以，为了彻底解决这个问题，我花费了近半年的时间构建了一个爬虫案例平台（<a href="https://scrape.center" target="_blank" rel="noopener">https://scrape.center</a>），平台包含了几十个爬虫案例，包括服务端渲染（SSR）网站、单页面应用（SPA）网站、各类反爬网站、验证码网站、模拟登录网站、各类 App 等，覆盖了现在爬虫和反爬虫相关的大多数技术，整个平台都是我来维护的，书中几乎所有案例都是从案例平台来的，从而解决了页面改版的问题。</p>
                  <p>所以，本书相比第一版来说，更新的内容主要如下：</p>
                  <ul>
                    <li>
                      <p>绝大多数都迁移到了自建的案例平台，以后再也不用担心案例有过期或改版问题。</p>
                    </li>
                    <li>
                      <p>替换了原本第一章环境安装的章节，将环境配置的部分全部汇总并迁移到案例平台（<a href="https://setup.scrape.center" target="_blank" rel="noopener">https://setup.scrape.center</a>）并在书中以外链的形式附上，以确保环境的配置和安装说明能够被及时更新。</p>
                    </li>
                    <li>
                      <p>增加了一些新的请求库、解析库、存储库等的介绍，如 httpx、parsel、Elasticsearch 等库的介绍。</p>
                    </li>
                    <li>
                      <p>增加了异步爬虫的介绍，如协程的基本原理、aiohttp 的使用和爬取实战介绍。</p>
                    </li>
                    <li>
                      <p>增加了一些新兴自动化工具的介绍，如 Pyppeteer、Playwright 的介绍。</p>
                    </li>
                    <li>
                      <p>增加了深度学习相关内容，如图形验证码、滑动验证码的识别方案。</p>
                    </li>
                    <li>
                      <p>丰富了模拟登录章节的内容，如增加了 JWT 模拟登录的介绍和实战、大规模账号池的优化。</p>
                    </li>
                    <li>
                      <p>增加了 JavaScript 逆向的章节，包括网站加密和混淆技术、JavaScript 逆向调试技巧、JavaScript 的各种模拟执行方式、AST 还原混淆代码、WebAssembly 等相关技术的介绍。</p>
                    </li>
                    <li>
                      <p>丰富了 App 自动化爬取技术的章节，如新兴框架 Airtest 的介绍、手机群控和云手机技术的介绍。</p>
                    </li>
                    <li>
                      <p>增加了 Android 逆向章节，如反编译、反汇编、Hook、脱壳、so 文件分析和模拟执行等技术的介绍。</p>
                    </li>
                    <li>
                      <p>增加了网页智能化解析章节，包括列表页、详情页内容提取算法和分类算法。</p>
                    </li>
                    <li>
                      <p>丰富了 Scrapy 相关章节的介绍，如 Pyppeteer 的对接、RabbitMQ 的对接、Prometheus 的对接等。</p>
                    </li>
                    <li>
                      <p>增加了基于 Kubernetes、Docker、Prometheus、Grafana 等云原生技术爬虫管理和运维解决方案的介绍。</p>
                    </li>
                  </ul>
                  <p>以上就是第二版的主要更新内容。</p>
                  <h2 id="章节介绍"><a href="#章节介绍" class="headerlink" title="章节介绍"></a>章节介绍</h2>
                  <p>为了让大家更直接地了解到全书的内容，这里就直接放目录了：</p>
                  <p><img src="https://qiniu.cuiqingcai.com/r21da.png" alt=""></p>
                  <p><img src="https://qiniu.cuiqingcai.com/sjp39.png" alt=""></p>
                  <p>没错！全书一共 900 多页，量了下有4.3 厘米厚，定价是 139.8 元。</p>
                  <h2 id="可以直接看第二版吗？"><a href="#可以直接看第二版吗？" class="headerlink" title="可以直接看第二版吗？"></a>可以直接看第二版吗？</h2>
                  <p>当然，有朋友也会担心，我需不需要先学习第一版，然后才能学第二版呢？</p>
                  <p>答案是：可以直接学第二版，第二版书爬虫的内容知识体系是完整的，一些旧的技术已经在第一版中移除，第二版的书籍是对所有爬虫知识体系的全新升级。</p>
                  <h2 id="没有基础可以学吗？"><a href="#没有基础可以学吗？" class="headerlink" title="没有基础可以学吗？"></a>没有基础可以学吗？</h2>
                  <p>有朋友也可能会问，没有爬虫或者 Python 基础可以学吗？</p>
                  <p>答案是：可以，本书就是专为零爬虫基础的朋友准备的，本书从最基础的环境配置、基础知识的讲解开始，循序渐进地对爬虫的各个知识点进行介绍，所以完全不用担心没有爬虫基础学不会的问题。如果没有 Python 基础，那也没关系（当然有会更好），书中也会提及 Python 环境的配置并附上一些 Python 入门学习资料（链接），同时也会通过各个 Python 代码片段来进行讲解，很多案例也很简单易懂，学爬虫的时候 Python 也就会逐渐掌握了。</p>
                  <h2 id="大咖推荐"><a href="#大咖推荐" class="headerlink" title="大咖推荐"></a>大咖推荐</h2>
                  <p>这本书同时还获得了 Python 之父的推荐（没错就是 Python 的创始人，Guido van Rossum）。另外我还有幸获得了微软亚洲互联网工程院副院长曾文峰、知名爬虫专家梁斌penny、中国人民大学高瓴人工智能学院长聘副教授宋睿华的推荐。</p>
                  <p>下面是推荐语的内容：</p>
                  <p><img src="https://qiniu.cuiqingcai.com/dpw4v.png" alt=""></p>
                  <h2 id="宣传彩页"><a href="#宣传彩页" class="headerlink" title="宣传彩页"></a>宣传彩页</h2>
                  <p>另外编辑还为本书制作了几张宣传彩页，是对整本书的一个宣传介绍，大家可以看下：</p>
                  <p><img src="https://qiniu.cuiqingcai.com/vliby.png" alt=""></p>
                  <h2 id="有没有电子版？"><a href="#有没有电子版？" class="headerlink" title="有没有电子版？"></a>有没有电子版？</h2>
                  <p>看到这里，大家可能也会问了，有没有电子版呢？可能有的朋友习惯用电子版书籍来学习，有的朋友可能在海外也不方便购买，所以想要电子版。</p>
                  <p>但还是很遗憾地说：没有电子版。</p>
                  <p>因为你知道的，如果出了电子版，那么马上就会有各种盗版袭来，网上也会造成各种恶意传播。</p>
                  <p>所以，为了保护版权，这本书是没有上电子版的。</p>
                  <h2 id="购买链接"><a href="#购买链接" class="headerlink" title="购买链接"></a>购买链接</h2>
                  <p>是的，最后就是大家最关心的部分了，到哪里能够买到呢？</p>
                  <p>上架之前，我与编辑经过各种沟通，原本是想给广大读者和粉丝们有个专属优惠的，但是这个比较难操作，所以最终决定，整本书现在全网统一 7 折销售了！</p>
                  <p>也就是说，原价 139.8 元，现在只需要 97.9 元就能买到了。</p>
                  <p>不过这个也是限时的，7 折优惠只到下周五，也就是 12 月 3 日，之后会恢复 84 折销售，也就是 117 元。</p>
                  <p>另外还有一个消息，前几天我不是签名了 1000 本书吗？所以，现在这个阶段，卖的全都是签名版，一共 1000 本，卖完即止，先到先得。</p>
                  <p>如果不想要签名版的朋友可以再等等，等签名版的卖完了就是非签名版的了。</p>
                  <p><img src="https://qiniu.cuiqingcai.com/48dy1.png" alt=""></p>
                  <p>购买链接：<a href="https://item.jd.com/13527222.html" target="_blank" rel="noopener">https://item.jd.com/13527222.html</a></p>
                  <p>为了方便购买，我把这个链接转成了二维码，大家可以直接扫码购买：</p>
                  <p><img src="https://qiniu.cuiqingcai.com/1rhg8.png" alt=""></p>
                  <p>谢谢大家支持！</p>
                  <p>更多精彩内容，请关注我的公众号「进击的 Coder」和「崔庆才丨静觅」。</p>
                  </p>
                </div>
              </div>
              <div class="post-meta">
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-user"></i>
                  </span>
                  <span class="post-meta-item-text">作者</span>
                  <span><a href="/authors/崔庆才" class="author" itemprop="url" rel="index">崔庆才</a></span>
                </span>
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-calendar"></i>
                  </span>
                  <span class="post-meta-item-text">发表于</span>
                  <time title="创建时间：2021-11-26 02:50:22" itemprop="dateCreated datePublished" datetime="2021-11-26T02:50:22+08:00">2021-11-26</time>
                </span>
                <span id="/31116.html" class="post-meta-item leancloud_visitors" data-flag-title="《Python3网络爬虫开发实战（第二版）》终终终终于来了！！！！" title="阅读次数">
                  <span class="post-meta-item-icon">
                    <i class="fa fa-eye"></i>
                  </span>
                  <span class="post-meta-item-text">阅读次数：</span>
                  <span class="leancloud-visitors-count"></span>
                </span>
                <span class="post-meta-item" title="本文字数">
                  <span class="post-meta-item-icon">
                    <i class="far fa-file-word"></i>
                  </span>
                  <span class="post-meta-item-text">本文字数：</span>
                  <span>3k</span>
                </span>
                <span class="post-meta-item" title="阅读时长">
                  <span class="post-meta-item-icon">
                    <i class="far fa-clock"></i>
                  </span>
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                  <span>3 分钟</span>
                </span>
              </div>
            </article>
            <article itemscope itemtype="http://schema.org/Article" class="post-block index" lang="zh-CN">
              <link itemprop="mainEntityOfPage" href="https://cuiqingcai.com/31115.html">
              <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
                <meta itemprop="image" content="/images/avatar.png">
                <meta itemprop="name" content="崔庆才">
                <meta itemprop="description" content="崔庆才的个人站点，记录生活的瞬间，分享学习的心得。">
              </span>
              <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
                <meta itemprop="name" content="静觅">
              </span>
              <header class="post-header">
                <h2 class="post-title" itemprop="name headline">
                  <a class="label"> Python <i class="label-arrow"></i>
                  </a>
                  <a href="/31115.html" class="post-title-link" itemprop="url">终于签完了，1000 本...</a>
                </h2>
              </header>
              <div class="post-body" itemprop="articleBody">
                <div class="thumb">
                  <img itemprop="contentUrl" class="random">
                </div>
                <div class="excerpt">
                  <p>
                  <p>是的，今天我终于完成了我的新书《Python3网络爬虫开发实战（第二版）》的签名，一共 1000 本，整个过程感觉着实不容易啊。</p>
                  <p>签完我就来写这篇文章了，感觉左右胳膊完全不是一个感觉。</p>
                  <h2 id="1"><a href="#1" class="headerlink" title="1"></a>1</h2>
                  <p>先说下事情的来龙去脉吧，因为很多读者想要一本签名版的书籍，毕竟有需求就有市场。于是编辑和我商讨之后，让我对其中的一部分进行签名。</p>
                  <p>其实当时第一版出来的时候也签了一些，那会签的少，我记得只有三百多本。</p>
                  <p>遥想那会，还是 2018 年，那会第一版的书刚刚印刷出来，那会我是去河北的一个印厂签名的。印厂把新鲜出炉的扉页的那一沓拿给我，我一个个进行签名，我还有当年签名的照片：</p>
                  <p><img src="https://qiniu.cuiqingcai.com/qx2b6.png" alt=""></p>
                  <p><img src="https://qiniu.cuiqingcai.com/akvkm.png" alt=""></p>
                  <p>我去，我当年这么瘦的吗？ </p>
                  <p>这里简单说下扉页这一沓是怎么回事，有朋友就会好奇问为啥不直接拿给你一张纸，而是一沓纸呢？这是因为印刷的时候是用的一张大纸，比如正反面一张大纸就能覆盖书的二三十页内容，然后印刷完毕之后，这张大纸就会被折叠，最后就得到了这小小的一沓。</p>
                  <p>所以，每一本书，我只需要在这一小沓纸上签名，最后印厂再拿回去进行锁线、装订那就得到完整的书了。</p>
                  <h2 id="2"><a href="#2" class="headerlink" title="2"></a>2</h2>
                  <p>好了，再说回签名的事。</p>
                  <p>今年和往年的签名流程不一样了。</p>
                  <p>印厂还是在河北，然而由于疫情原因，北京疫情管控非常严格，进京必须要 2 日之内的核算证明。另外去的话还不能光我一人吧，加上编辑还有同行同事肯定至少也得三个人，就感觉比较麻烦。</p>
                  <p>于是我们就决定这次不去印厂签名了（所以就没法拍照片了）。</p>
                  <p>那怎么办呢？</p>
                  <p>我们就决定让印厂把书的扉页都拿给我，然后我签完了再运回印厂，印厂再进行组装。</p>
                  <p>于是乎，在周二的时候，我收到了整整两大箱子书扉页。</p>
                  <p><img src="https://qiniu.cuiqingcai.com/2aiyp.png" alt=""></p>
                  <p>好家伙，这数量着实不少啊，而且特别重。</p>
                  <p>另外我住的地方其实是没有电梯的 6 楼，光搬上去就废了好大的劲。</p>
                  <p>后来，从周二开始，周二、三、四、五，我每天下班之后都签一点，每天两百多本。</p>
                  <p>差不多下班后要花将近两小时签名吧，我也没仔细计算，可能中间有少许休息时间，所以这几天光签名得花了得有七八小时？</p>
                  <h2 id="3"><a href="#3" class="headerlink" title="3"></a>3</h2>
                  <p>然后一直到今晚上，哦不，应该是凌晨，终于是签完了。</p>
                  <p>感觉手都签麻了。</p>
                  <p>这是一开始的时候签的：</p>
                  <p><img src="https://qiniu.cuiqingcai.com/4cdv3.png" alt=""></p>
                  <p>这是最后的时候签的：</p>
                  <p><img src="https://qiniu.cuiqingcai.com/8721c.png" alt=""></p>
                  <p>哪个好看？一定是第二张好看对不对？！更加飘逸对不对？（逃</p>
                  <p>最后晒一下完整成果吧，整整两箱子，都签好啦！</p>
                  <p><img src="https://qiniu.cuiqingcai.com/jxv8w.png" alt=""></p>
                  <p><img src="https://qiniu.cuiqingcai.com/cqagj.png" alt=""></p>
                  <p>我联系了印厂，印厂周六会有师傅过来我家取。</p>
                  <p>等师傅取回印厂之后，印厂就会安排锁线、装订、裁切等各个环节，最后完整的书就有啦。</p>
                  <h2 id="4"><a href="#4" class="headerlink" title="4"></a>4</h2>
                  <p>然后到这里，就会有朋友问了，现在书到底啥时候能买到啊？</p>
                  <p>其实非签名版的书已经印刷好啦，前天的时候编辑已经拿到了样书，今天还有给书的专门拍摄，这里给大家看看样子哈。</p>
                  <p><img src="https://qiniu.cuiqingcai.com/iv89c.png" alt=""></p>
                  <p><img src="https://qiniu.cuiqingcai.com/v4eei.png" alt=""></p>
                  <p><img src="https://qiniu.cuiqingcai.com/qftp9.png" alt=""></p>
                  <p><img src="https://qiniu.cuiqingcai.com/xgn45.png" alt=""></p>
                  <p><img src="https://qiniu.cuiqingcai.com/rbxzi.png" alt=""></p>
                  <p>这是编辑发我的图，我其实还没拿到实体书。</p>
                  <p>然后我就问编辑，这书厚不厚啊？</p>
                  <p>编辑说，厚！</p>
                  <p>然后给我发了一张测量图：</p>
                  <p><img src="https://qiniu.cuiqingcai.com/lrz2w.png" alt=""></p>
                  <p>好家伙，我直接好家伙，4.3 cm 厚，大家感受一下吧。</p>
                  <p>加上用的纸还算比较好的，好像说有两三斤重？</p>
                  <p>emm，具体到手之后再体验下吧。</p>
                  <p>印刷完了之后，接下来就是入库销售了。</p>
                  <p>然后具体的售卖时间，编辑说周末或下周一会知道入库时间是什么时候，但我预估下周应该大家就可以开始购买啦。</p>
                  <p>签名版的话可能会先预售，就是发货较晚的意思，因为我刚刚签完，组装还需要几天时间，到时候应该会在京东上直接销售签名版。</p>
                  <p>售价的话，应该会打 7 折，原价 139.8，所以打完折是 98 元。</p>
                  <p>嗯嗯！总之，大家马上就可以买到啦，实在让大家久等了，到时候我会在公号第一时间发布最新消息，非常感谢大家的支持！</p>
                  <p>撒花！</p>
                  <p>更多精彩内容，请关注我的公众号「进击的 Coder」和「崔庆才丨静觅」。</p>
                  </p>
                </div>
              </div>
              <div class="post-meta">
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-user"></i>
                  </span>
                  <span class="post-meta-item-text">作者</span>
                  <span><a href="/authors/崔庆才" class="author" itemprop="url" rel="index">崔庆才</a></span>
                </span>
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-calendar"></i>
                  </span>
                  <span class="post-meta-item-text">发表于</span>
                  <time title="创建时间：2021-11-20 02:50:22" itemprop="dateCreated datePublished" datetime="2021-11-20T02:50:22+08:00">2021-11-20</time>
                </span>
                <span id="/31115.html" class="post-meta-item leancloud_visitors" data-flag-title="终于签完了，1000 本..." title="阅读次数">
                  <span class="post-meta-item-icon">
                    <i class="fa fa-eye"></i>
                  </span>
                  <span class="post-meta-item-text">阅读次数：</span>
                  <span class="leancloud-visitors-count"></span>
                </span>
                <span class="post-meta-item" title="本文字数">
                  <span class="post-meta-item-icon">
                    <i class="far fa-file-word"></i>
                  </span>
                  <span class="post-meta-item-text">本文字数：</span>
                  <span>1.4k</span>
                </span>
                <span class="post-meta-item" title="阅读时长">
                  <span class="post-meta-item-icon">
                    <i class="far fa-clock"></i>
                  </span>
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                  <span>1 分钟</span>
                </span>
              </div>
            </article>
            <article itemscope itemtype="http://schema.org/Article" class="post-block index" lang="zh-CN">
              <link itemprop="mainEntityOfPage" href="https://cuiqingcai.com/31114.html">
              <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
                <meta itemprop="image" content="/images/avatar.png">
                <meta itemprop="name" content="崔庆才">
                <meta itemprop="description" content="崔庆才的个人站点，记录生活的瞬间，分享学习的心得。">
              </span>
              <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
                <meta itemprop="name" content="静觅">
              </span>
              <header class="post-header">
                <h2 class="post-title" itemprop="name headline">
                  <a class="label"> Other <i class="label-arrow"></i>
                  </a>
                  <a href="/31114.html" class="post-title-link" itemprop="url">2核4G 8M服务器70元+社区返现，社区&腾讯云双十一云产品活动来啦！</a>
                </h2>
              </header>
              <div class="post-body" itemprop="articleBody">
                <div class="thumb">
                  <img itemprop="contentUrl" class="random">
                </div>
                <div class="excerpt">
                  <p>
                  <p>以往各大云服务商在双十一大促都会推出很多活动，例如前几年会有 1核2G1M 69 元这类新用户活动。没想到今年腾讯云活动相当猛，<strong>2核CPU+4G内存+8M带宽首年</strong> 才 <strong>70</strong> 块钱！如果按 <strong>3</strong> 年买，也只是 <strong>198</strong> 元，要知道平时买这样的服务器，怎么说也要 1000+ 元。</p>
                  <p>如果你不懂如何操作云服务器，可以观看【社区公开课】视频-<a href="https://chuanjiabing.com/thread/289" target="_blank" rel="noopener">工程师必知必会的 Linux 云服务器</a></p>
                  <p><img src="https://img.weishidong.com/20211109213354.png" alt="活动主会场"></p>
                  <p>除此之外，腾讯云那边联系到社区一起办活动，给了一部分奖励，大家从<strong>社区链接购买</strong>他们本次活动产品的可以<strong>找社区小助手返现金</strong>，具体活动规则如下：</p>
                  <p>1、腾讯云<strong>新用户</strong> （个人或企业）购买金额大于 <strong>100</strong> 元，社区将按购买金额的 5% 进行返现；<br>2、腾讯云<strong>新用户</strong> （个人或企业）购买金额大于 <strong>50</strong> 、小于 <strong>100</strong> 元，社区一次性返现 5 元；<br>3、腾讯云<strong>新用户</strong> （个人或企业）购买金额大于 <strong>1000</strong> 元，社区将按购买金额的 10% 进行返现；<br>4、腾讯云<strong>老用户</strong> （个人或企业）购买金额大于 <strong>300</strong> 元，社区将按购买金额的 5% 进行返现；</p>
                  <p>5、如果购买多个产品，请在<strong>同一个订单</strong>中结算（即一次性购买）；</p>
                  <p>社区专属活动链接（可<a href="https://cloud.tencent.com/act/double11?spread_hash_key=92518f4cf8e4cb326251fe0f7537bc23&amp;cps_key=f31586a82039422aee085aac372348bd" target="_blank" rel="noopener">点击此处跳转</a>也可复制下方地址）：</p>
                  <figure class="highlight awk">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">https:<span class="regexp">//</span>cloud.tencent.com<span class="regexp">/act/</span>double11?spread_hash_key=<span class="number">92518</span>f4cf8e4cb326251fe0f7537bc23&amp;cps_key=f31586a82039422aee085aac372348bd</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p><img src="https://discuz-1306601599.file.myqcloud.com/public/attachments/2021/11/05/a5eb2049efa0c0e07b51e375eb60cb2e724c312cimage.png?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDMbbKmytXu0oLbaHjvpSothFXYIlxrUqu%26q-sign-time%3D1636464735%3B1636551195%26q-key-time%3D1636464735%3B1636551195%26q-header-list%3Dhost%26q-url-param-list%3D%26q-signature%3D7c334240a857b3048469afb00be005bea070651d&amp;" alt="attachmentId-956"></p>
                  <p>活动截止时间：活动截止日期为 2021-11-30 日 12:00:00；</p>
                  <p>奖励是否叠加：不叠加；</p>
                  <p>返现发放时间：预计 30 个工作日内；</p>
                  <p>返现发放方式：个人微信/支付宝打款、企业对公打款；</p>
                  <p><strong>⚠️ 活动参与要求</strong> ：必须是穿甲兵技术社区用户；通过<strong>社区提供的链接</strong>前往腾讯云双十一活动主会场，购买主会场中推荐的腾讯云产品；活动 COOKIE 持续 <strong>30</strong> 分钟，点击后<strong>如果还在观察活动、未购买的朋友，在购买前请再点击一次社区专属活动链接</strong> ，以免后续在后台查询不到订单信息，也就拿不到返现。</p>
                  <p>参与活动的朋友，请联系穿<strong>甲兵小助手</strong> (微信 <strong>elasticworm</strong> )计算返现；</p>
                  <p>社区补贴活动刚开始 2 天，已经有 <strong>150</strong> 多人参加了，他们都联系了小助手要补贴，火热火热的！<strong>错过了这次大促活动，以后买服务器可贵了</strong>！</p>
                  <p><img src="https://img.weishidong.com/20211109213742.png" alt="参与名单"></p>
                  <p>除了云服务器活动给力之外，新用户注册 .com 域名首年也只需要 1 元!</p>
                  <p>腾讯云还为大家准备了代金券，简直省到家了</p>
                  <p><img src="https://img.weishidong.com/20211109213359.png" alt="代金券"></p>
                  <p>⚠️注意：社区云产品规则、适用范围等请阅读腾讯云相关文档；</p>
                  </p>
                </div>
              </div>
              <div class="post-meta">
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-user"></i>
                  </span>
                  <span class="post-meta-item-text">作者</span>
                  <span><a href="/authors/崔庆才" class="author" itemprop="url" rel="index">崔庆才</a></span>
                </span>
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-calendar"></i>
                  </span>
                  <span class="post-meta-item-text">发表于</span>
                  <time title="创建时间：2021-11-10 02:50:22" itemprop="dateCreated datePublished" datetime="2021-11-10T02:50:22+08:00">2021-11-10</time>
                </span>
                <span id="/31114.html" class="post-meta-item leancloud_visitors" data-flag-title="2核4G 8M服务器70元+社区返现，社区&腾讯云双十一云产品活动来啦！" title="阅读次数">
                  <span class="post-meta-item-icon">
                    <i class="fa fa-eye"></i>
                  </span>
                  <span class="post-meta-item-text">阅读次数：</span>
                  <span class="leancloud-visitors-count"></span>
                </span>
                <span class="post-meta-item" title="本文字数">
                  <span class="post-meta-item-icon">
                    <i class="far fa-file-word"></i>
                  </span>
                  <span class="post-meta-item-text">本文字数：</span>
                  <span>1k</span>
                </span>
                <span class="post-meta-item" title="阅读时长">
                  <span class="post-meta-item-icon">
                    <i class="far fa-clock"></i>
                  </span>
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                  <span>1 分钟</span>
                </span>
              </div>
            </article>
            <article itemscope itemtype="http://schema.org/Article" class="post-block index" lang="zh-CN">
              <link itemprop="mainEntityOfPage" href="https://cuiqingcai.com/31113.html">
              <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
                <meta itemprop="image" content="/images/avatar.png">
                <meta itemprop="name" content="崔庆才">
                <meta itemprop="description" content="崔庆才的个人站点，记录生活的瞬间，分享学习的心得。">
              </span>
              <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
                <meta itemprop="name" content="静觅">
              </span>
              <header class="post-header">
                <h2 class="post-title" itemprop="name headline">
                  <a class="label"> Python <i class="label-arrow"></i>
                  </a>
                  <a href="/31113.html" class="post-title-link" itemprop="url">《Python3网络爬虫开发实战（第二版）》封面确定好了！</a>
                </h2>
              </header>
              <div class="post-body" itemprop="articleBody">
                <div class="thumb">
                  <img itemprop="contentUrl" class="random">
                </div>
                <div class="excerpt">
                  <p>
                  <p>前些天我发起了一个投票，让大家帮忙为 《Python3网络爬虫开发实战（第二版）》选几个封面，大家也纷纷出谋划策。</p>
                  <p>其实第二版和第一版整体差别不大，这次设计主要就是换个封面的图片，然后加一个第二版的标识就好了。</p>
                  <p>之前第一版的封面是这样的：</p>
                  <p><img src="https://qiniu.cuiqingcai.com/zys0q.png" alt=""></p>
                  <p>但这个蜘蛛我觉得还有改进的空间，于是就想换一个。</p>
                  <p>然后我就自己设计了一个，然后同时设计师也设计了一个，最后出来这么几个版本：</p>
                  <p><img src="https://qiniu.cuiqingcai.com/a2x5c.png" alt=""></p>
                  <p><img src="https://qiniu.cuiqingcai.com/kqtte.png" alt=""></p>
                  <p>当时就是拿不定主意，然后就发起了一个投票活动，邀请群里的各个小伙伴们来投票。</p>
                  <p>大家参与也很积极，三百多个人参与了投票，结果是这样的：</p>
                  <p><img src="https://qiniu.cuiqingcai.com/fkn2a.png" alt=""></p>
                  <p>当时选项一就是刚才设计的第一张图片，选项二和三就是刚才设计的第二张图片，只是背景元素稍微换了换。</p>
                  <p>结果大家几乎清一色的都投了选项三。</p>
                  <p>但其实我对这个选项的蜘蛛不太满意，它长这样：</p>
                  <p><img src="https://qiniu.cuiqingcai.com/zo0cw.png" alt=""></p>
                  <p>我就感觉，这怎么跟闹着玩似的？而且腿也太细了吧，也没点过渡和弯折，比较奇怪。但是第一个设计的根据大家的反馈，说蜘蛛的形态比较吓人，还有的人说看起来不像蜘蛛，像章鱼，我也是醉了。</p>
                  <p>反正上面这俩图我都越想越不满意，总体上还是因为轮廓的原因吧。</p>
                  <p>然后我就像自己再找一些蜘蛛轮廓，准备再做一个。</p>
                  <p>怎么做呢？</p>
                  <p>如果找到好看的轮廓，其实就是生成一个词云图就好了。</p>
                  <p>我找啊找，又搜到了几个不错的轮廓，接下来就是把这个轮廓生成词云图了。</p>
                  <p>大家可能会想，这个词云图生成也太麻烦了吧，有对应的关键字，还要符合对应的轮廓，还要同时好看，这搞起来有点难啊，目前市面上我问了下找设计师搞个词云图也得 500 块钱呢。</p>
                  <p>当然，其实 Python 也有对应的词云图生成库，但功能我觉得还是没有那么精细化。</p>
                  <p>难道要自己画？</p>
                  <p>其实不用这么麻烦，我找到了一个网站，叫做微词云，这个还是比较简单好用的，我们只需要输入关键词和每个词的频率，还能自定义想要的轮廓，它就能自动生成词云图了，如图所示：</p>
                  <p><img src="https://qiniu.cuiqingcai.com/ipl5j.png" alt=""></p>
                  <p>这就是确定的一个新轮廓，这个蜘蛛是不是看起来就舒服多了？看起来既不吓人，又没那么奇怪。</p>
                  <p>最后我找了好多小伙伴也看了看最终的效果，大家都觉得这个放在封面上挺不错的。</p>
                  <p>嗯！最后就是它了！经过几天的修改，最后的效果如下：</p>
                  <p><img src="https://qiniu.cuiqingcai.com/nsuvb.png" alt=""></p>
                  <p>同时在第一版封面上还加上了 Python 之父推荐的相关字样，另外「第 2 版」三个字就直接标识到了图书标题的下面。</p>
                  <p>最后的完整全封如下：</p>
                  <p><img src="https://qiniu.cuiqingcai.com/61xmn.png" alt=""></p>
                  <p>背面是四位专家的推荐语。</p>
                  <p>定价是 139.8 元，没错，这本书最后 900 多页，139.8 元，其实这个价格在这个页码基础上已经算很合算了。</p>
                  <p>书现在是什么状态呢？</p>
                  <p>现在稿子已经送到印检部啦，印前检查没问题就直接印刷啦：</p>
                  <p><img src="https://qiniu.cuiqingcai.com/dslyu.png" alt=""></p>
                  <p>等印刷出来之后我还会去印厂签上千本名，到时候就会有签名版的书搞活动送给大家哈。</p>
                  <p>请大家耐心等待几天，书很快就可以跟大家见面啦～</p>
                  <p>更多精彩内容，请关注我的公众号「进击的 Coder」和「崔庆才丨静觅」。</p>
                  </p>
                </div>
              </div>
              <div class="post-meta">
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-user"></i>
                  </span>
                  <span class="post-meta-item-text">作者</span>
                  <span><a href="/authors/崔庆才" class="author" itemprop="url" rel="index">崔庆才</a></span>
                </span>
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-calendar"></i>
                  </span>
                  <span class="post-meta-item-text">发表于</span>
                  <time title="创建时间：2021-10-30 23:50:22" itemprop="dateCreated datePublished" datetime="2021-10-30T23:50:22+08:00">2021-10-30</time>
                </span>
                <span id="/31113.html" class="post-meta-item leancloud_visitors" data-flag-title="《Python3网络爬虫开发实战（第二版）》封面确定好了！" title="阅读次数">
                  <span class="post-meta-item-icon">
                    <i class="fa fa-eye"></i>
                  </span>
                  <span class="post-meta-item-text">阅读次数：</span>
                  <span class="leancloud-visitors-count"></span>
                </span>
                <span class="post-meta-item" title="本文字数">
                  <span class="post-meta-item-icon">
                    <i class="far fa-file-word"></i>
                  </span>
                  <span class="post-meta-item-text">本文字数：</span>
                  <span>1.1k</span>
                </span>
                <span class="post-meta-item" title="阅读时长">
                  <span class="post-meta-item-icon">
                    <i class="far fa-clock"></i>
                  </span>
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                  <span>1 分钟</span>
                </span>
              </div>
            </article>
            <article itemscope itemtype="http://schema.org/Article" class="post-block index" lang="zh-CN">
              <link itemprop="mainEntityOfPage" href="https://cuiqingcai.com/31111.html">
              <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
                <meta itemprop="image" content="/images/avatar.png">
                <meta itemprop="name" content="崔庆才">
                <meta itemprop="description" content="崔庆才的个人站点，记录生活的瞬间，分享学习的心得。">
              </span>
              <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
                <meta itemprop="name" content="静觅">
              </span>
              <header class="post-header">
                <h2 class="post-title" itemprop="name headline">
                  <a class="label"> Python <i class="label-arrow"></i>
                  </a>
                  <a href="/31111.html" class="post-title-link" itemprop="url">我的新书《Python3网络爬虫开发实战（第二版）》获得 Python 之父的推荐了！</a>
                </h2>
              </header>
              <div class="post-body" itemprop="articleBody">
                <div class="thumb">
                  <img itemprop="contentUrl" class="random">
                </div>
                <div class="excerpt">
                  <p>
                  <p>别急，这书现在还没上市哈，但很快了。</p>
                  <p>最近朋友们一直在催：<strong>你的第二版爬虫书怎么还不出来啊，我都等了好几年了！你不是前几个月就完稿了吗？咋这么慢。</strong> </p>
                  <p>别急，这下是真的很快就要上市了。</p>
                  <p>为啥我的第二版书“难产”了呢？原因有好多：</p>
                  <ul>
                    <li>
                      <p>一个就是工作原因，之前第一版书是读研期间写的，工作之后发现书中的一些案例已经过期了，于是就决定写第二版。但工作毕竟是工作，工作的内容还是需要放在第一位的，所以第二版书的内容基本都是利用下班之后或者周末的时间写出来的，所以进度很慢。</p>
                    </li>
                    <li>
                      <p>另外一个就是为了解决案例过期的问题，之前耗费了很多精力自己制作了爬虫案例平台，<a href="https://scrape.center/" target="_blank" rel="noopener">https://scrape.center/</a>，里面做了几十个爬虫案例，书中对这些案例进行了配合讲解，这就解决了一些案例过期的问题，也能更好地帮助读者进行练习，前前后后这个案例平台做了也有小半年的时间。</p>
                    </li>
                  </ul>
                  <p>等书籍完稿之后，其实还有不少的事情，比如审稿、修改、封面设计、推荐语等等，总之步骤是很繁琐的，改天再写个文章专门介绍下写书这件事。</p>
                  <p>单独说说推荐语。</p>
                  <p>推荐语就是印在书的背面的各位专家对本书的评价和推荐内容，一般就是几句话加上专家的 Title。就在推荐语这一块上，我还憋了个“大招”，那就是让 Python 之父 Guido van Rossum 给我写个推荐语。</p>
                  <p>Python 之父想必大家应该知道是谁吧？就是 Guido van Rossum，Python 就是他在 1989 年编写出来的。</p>
                  <p><img src="https://qiniu.cuiqingcai.com/1ekff.png" alt=""></p>
                  <p>有人说，你还真敢想，还想让 Python 之父给你这本“名不见经传”的书写推荐语？闹呢？人家怎么可能会理你？</p>
                  <p>其实想想确实不可思议的，但我还是想试试，如果真的能拿到 Python 之父的推荐，那简直是荣幸之至！</p>
                  <p>另外由于我在微软工作，Python 之父 Guido 2020 年也宣布加入微软。所以，我和他也多少是同一个公司的了（但显然职位差距过大）。</p>
                  <p>所以，没准还是有机会的呢？</p>
                  <p>好，那么问题来了，我这书都是中文写的，Python 之父是看不懂中文的，咋办呢？难道我要把全书都翻译一遍吗？</p>
                  <p>是的，还真得是这样，我不能给个中文内容或者啥也不给就干巴巴地要求他帮我写推荐语吧？这也太滑稽了。</p>
                  <p>在此之前，有好几个月时间整本书的内容还在审稿和修改，等稿子审完的时候差不多就九月份了，然后九月份左右，我就拿到了编辑那边给到的全书审核完毕的 Word 文档，但还没正式排版。看了看，这个 Word 文档一共有 1000 多页，好家伙，我真的不敢相信我写了这么多。</p>
                  <p>但也没办法，那也得翻译一遍。</p>
                  <p>如果我全部手工翻译也太麻烦了，于是我就从网上找了一些工具，比如 Word 全文翻译工具，其背后就是对接了 Google 翻译，但这些工具还有上传大小限制，于是我就又把各个章节进行了拆分，一部分一部分地翻译完了再合并起来。</p>
                  <p>当然大家知道，Google 翻译肯定质量不能保证的吧，比如一些说法和名词就翻译不太准确，我就得进行手工审查和修改。所以我又花了好多天时间对全文进行检查和修改，包括不准确的标题、表述、名词等等。然后我还对整个目录索引重新规整了一遍。</p>
                  <p>总之整个翻译准备过程差不多也花了半个月的时间，最后翻译完了英文版差不多 1600 页，如图所示，比如目录最后一节就是 1561 页了：</p>
                  <p><img src="https://qiniu.cuiqingcai.com/nybvt.png" alt="全书翻译"></p>
                  <p>但是，这个其实还不够，如果把这个书丢过去，人家没时间看怎么办？我总得好好介绍下整本书的情况吧。</p>
                  <p>于是我又把书的介绍和前言又翻译了一遍，内容包括：写书的初衷、整本书的介绍、整体章节的规划，这样的话能帮助 Guido 更好地理解整本书的脉络和内容。</p>
                  <p>于是又有了如下的内容：</p>
                  <p><img src="https://qiniu.cuiqingcai.com/k6dnm.png" alt="书的介绍"></p>
                  <p>好像还是不够，万一 Guido 觉得写推荐语很麻烦怎么办？如果我能给他提供几个 Draft Candidate 候选是不是更有帮助一些？这样他可以找些灵感或者稍微修改下就好了，于是我又草拟了一些候选推荐语，整理了一个文档。</p>
                  <p>嗯，好像就准备差不多了，一共三个东西：</p>
                  <ul>
                    <li>
                      <p>全书的翻译内容</p>
                    </li>
                    <li>
                      <p>书的内容介绍</p>
                    </li>
                    <li>
                      <p>候选推荐语</p>
                    </li>
                  </ul>
                  <p>接下来就是联系 Guido 了，心中一阵忐忑。</p>
                  <p>为了更正式一点，我发了一封邮件给 Guido，邮件整体的内容就是：先表示下对他的感谢和敬佩，然后介绍下自己的基本情况和书的基本情况，比如我是做什么的，第一版书在中国的销量等等，接着开门见山地说想要请他帮忙写一段推荐语。然后后面就附上我的书的一些详细信息，比如我整理的全文翻译书稿、内容介绍、候选推荐语等。</p>
                  <p>内容如下：</p>
                  <p><img src="https://qiniu.cuiqingcai.com/8koka.png" alt=""></p>
                  <p>我怀着十分忐忑而又激动的心情，按下了发送键。</p>
                  <p>接下来就是漫长的等待。</p>
                  <p>我每天早上醒来都会看看邮件有没有收到 Guido 的回信。</p>
                  <p>没回。</p>
                  <p>还是没回。</p>
                  <p>还是还是没回。</p>
                  <p>还是还是还是没回。</p>
                  <p>好像要凉了。</p>
                  <p>好像凉了。</p>
                  <p>好像真凉了。</p>
                  <p>真的凉了。</p>
                  <p>可能真的是太忙或者没看到我的邮件吧。</p>
                  <p>后来，我就联系了我们部门的总 Director（这里就不透露具体信息了），看看他能不能帮我 connect 一下 Guido，他爽快地答应了。</p>
                  <p>不太清楚我的Director怎么联系的，他说单独找了下 Guido，可能是发信或者内部联系。</p>
                  <p>然后第二天，他就告诉我，得到 Guido 回复了！Guido 说确实近期比较忙，也很希望能有一个 Draft Candidate 推荐语提供给他，他可以结合着书的内容来改写一下会更好。</p>
                  <p>我的 Director 人也非常好，他也给我出了很多建议，还帮我修改了下之前我写的 Draft Candidate 推荐语给他，转发了我的邮件还帮我又介绍了下。</p>
                  <p>最后，Guido 给了最终的推荐语！！</p>
                  <p><img src="https://qiniu.cuiqingcai.com/1copz.png" alt="Guido 的回信，遮盖了部分邮件内容"></p>
                  <p>收到这封邮件的时候我真的开心地要跳起来了，太开心了！我的书得终于拿到了 Python 之父的推荐啦！</p>
                  <p>正文如下：</p>
                  <blockquote>
                    <p>I am happy to see that Python is so widely used in the Chinese IT community. I hope this book will help more people understand Python and web crawling/scraping. *</p>
                    <p>—Guido van Rossum, creator of Python, Distinguished Engineer, Microsoft</p>
                  </blockquote>
                  <p>大意就是，我非常高兴 Python 能够在中国社区得到这么广泛的应用，希望本书能够帮助更多的朋友学习 Python 和网络爬虫。</p>
                  <p>嗯，整个过程比较漫长，但真的非常开心最终有了一个好的结果，真的非常荣幸能获得 Python 之父的推荐，同时也非常感谢我的 Director 帮我联系和出建议。</p>
                  <p>得到 Guido 的推荐语之后，后面的流程就很快了，还有其他各位专家的推荐语和序我也都联系好了，真的非常感谢各位专家的推荐，书中都会一一表示感谢。</p>
                  <p>现在内容也审核完毕了，最后把推荐语添加到封面上就投入印刷了！</p>
                  <p>请大家再耐心等待一小段时间，很快《Python3网络爬虫开发实战（第二版）》就要跟大家见面啦～</p>
                  <p>更多精彩内容，请关注我的公众号「进击的 Coder」和「崔庆才丨静觅」。</p>
                  </p>
                </div>
              </div>
              <div class="post-meta">
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-user"></i>
                  </span>
                  <span class="post-meta-item-text">作者</span>
                  <span><a href="/authors/崔庆才" class="author" itemprop="url" rel="index">崔庆才</a></span>
                </span>
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-calendar"></i>
                  </span>
                  <span class="post-meta-item-text">发表于</span>
                  <time title="创建时间：2021-10-17 23:50:22" itemprop="dateCreated datePublished" datetime="2021-10-17T23:50:22+08:00">2021-10-17</time>
                </span>
                <span id="/31111.html" class="post-meta-item leancloud_visitors" data-flag-title="我的新书《Python3网络爬虫开发实战（第二版）》获得 Python 之父的推荐了！" title="阅读次数">
                  <span class="post-meta-item-icon">
                    <i class="fa fa-eye"></i>
                  </span>
                  <span class="post-meta-item-text">阅读次数：</span>
                  <span class="leancloud-visitors-count"></span>
                </span>
                <span class="post-meta-item" title="本文字数">
                  <span class="post-meta-item-icon">
                    <i class="far fa-file-word"></i>
                  </span>
                  <span class="post-meta-item-text">本文字数：</span>
                  <span>2.7k</span>
                </span>
                <span class="post-meta-item" title="阅读时长">
                  <span class="post-meta-item-icon">
                    <i class="far fa-clock"></i>
                  </span>
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                  <span>2 分钟</span>
                </span>
              </div>
            </article>
            <article itemscope itemtype="http://schema.org/Article" class="post-block index" lang="zh-CN">
              <link itemprop="mainEntityOfPage" href="https://cuiqingcai.com/31112.html">
              <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
                <meta itemprop="image" content="/images/avatar.png">
                <meta itemprop="name" content="崔庆才">
                <meta itemprop="description" content="崔庆才的个人站点，记录生活的瞬间，分享学习的心得。">
              </span>
              <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
                <meta itemprop="name" content="静觅">
              </span>
              <header class="post-header">
                <h2 class="post-title" itemprop="name headline">
                  <a class="label"> 个人随笔 <i class="label-arrow"></i>
                  </a>
                  <a href="/31112.html" class="post-title-link" itemprop="url">焦虑的一个原因：没有明确的短期计划和目标</a>
                </h2>
              </header>
              <div class="post-body" itemprop="articleBody">
                <div class="thumb">
                  <img itemprop="contentUrl" class="random">
                </div>
                <div class="excerpt">
                  <p>
                  <p>大家有没有这样的一个经历：</p>
                  <p>周末和节假日出去疯玩了几天，期间没有任何学习或总结，到了周一前或者到了晚上的时候，会不会感觉到有点焦虑？比如就会想：我怎么今天又玩了一天，我还有什么什么事还没做呢，还有什么什么东西还没学呢，今天都没有什么进步，诸如此类的吧，然后就产生了一种焦虑感，想去做点什么事情找补一下。</p>
                  <p>我也有这样的情况。</p>
                  <p>我觉得我可能是一个自我 Push 比较强的人。比如有一天，我觉得自己做的东西没什么意义，或者疯玩了一天也没有学习和进步，到了一天结束的时候就会感到有些焦虑。我就想通过一些事情找补点什么回来，于是可能就想熬夜看点或者学习点东西。但实际上，有时候我也不知道应该看点什么，但总觉得需要学点或者看点什么，以“欺骗”自己的大脑今天我学习了，进步了，然后焦虑就会缓解一些。当然也有时候确实也知道自己每天还有什么事情没有完成，做完了焦虑就缓解了。</p>
                  <p>但长期以来，我感觉这样其实是不健康的，我也一直在思考我应该做点什么来解决这个问题。</p>
                  <p>经历了一些思考和尝试之后，我发现了其中的一个原因：当我给自己没有制定明确的计划和目标的时候，这种焦虑就会很频繁发生。</p>
                  <p>这个计划和目标分为长期的和短期的，长期目标和规划比较大、比较远或者说比较空洞，而短期目标和规划就是为了长期目标而制定的具体的执行方案，更能使我们焦虑的，就是短期目标和规划的缺失。</p>
                  <p>假如我没有为自己制定短期的计划，到了周末不上班的时候，就会突然不知道自己应该做些什么，至少在那一天我不知道应该做些什么。由于没有当天的规划，所以那天可能就漫无目的地休闲娱乐，比如说赖床、躺尸、刷手机（比如微博、知乎、朋友圈、抖音等）、玩游戏等等，当然也有时候无聊了就约朋友出去玩，但时间就这么一点点过去了。等到晚上到来，我就会发现，这一天怎么这么快就过去了？我好像今天也没有干什么事情，我就会焦虑，觉得今天也没有做有意义的事情，觉得我拥有的能够达成我的长期目标的时间和机会又变少了。因为长期计划会隐藏在我的潜意识里，我想达成某个大的目标，但经历了无所事事的一天之后，就会觉得我又浪费了一天，就会感觉到我能达成长期目标的几率仿佛又变小了，焦虑感就油然而生了。</p>
                  <p>为了验证我的这个想法，我就有意识地进行一些测试，比如在某一段时间我就不给自己制定短期和具体计划，任凭想到啥做啥，然后就发现那个时间段焦虑感很强。然后我就又尝试梳理自己的一些目标和具体每天应该做的一些事情，每天按照我的计划去执行，每天完成了既定计划之后，就会感觉很踏实。甚至完成了既定计划之后还能超额再做点什么的时候，就会感觉成就感爆棚。</p>
                  <p>嗯，总之，经过我的一些尝试之后，就感觉 —— 为自己制定短期的目标和规划真的很有帮助，这个短期的目标和规划时间段可能在一个月或者几周，先想这个月或者几周应该去做些什么，然后细化到每天应该去做些什么，这个一定要列详细，不要空洞，然后最好还能标记好优先级。就比如说，我规划一个月可能要学一门课程，那么我就分配一下，我哪一天需要具体学从第几节到第几节的内容，记录到我的 Todo List 里面。我是用的「滴答清单」这款软件，在里面我就给我每天需要做的事情做好分配，这样每天我就知道自己需要做什么了。</p>
                  <p>但这时候有朋友可能就说，难道你周末规划的也全是学习和工作吗？娱乐、放松呢？这个当然也是有的。我觉得人不能把自己逼的太紧了，每天都紧绷着做各种各样的事情，弦会断的。所以，有时候我就会给自己规划有些时间段就是可以放松和玩的，比如周五晚上就玩游戏、周六上午就赖床多睡会、周末也会规划时间出去玩等等。</p>
                  <p>所以，做好了规划，不论是学习、工作还是放松、娱乐，这都是在自己的期望和规划之中。比如我就规划了某个时间段去放空自己玩两天，那两天就全身心放松玩两天，那也不会有什么焦虑，因为这就在我的期望之内，我知道玩完这两天，我后面的一些规划时间和事情仍然可以正常完成我做达成的短期和长期目标，焦虑感自然就不会产生了。</p>
                  <p>嗯，就是这样。如果你也遇到了文章一开始我提到的问题，不妨尝试给自己制定一个详细的短期目标和规划吧。</p>
                  <p>更多精彩内容，请关注我的公众号「进击的 Coder」和「崔庆才丨静觅」。</p>
                  </p>
                </div>
              </div>
              <div class="post-meta">
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-user"></i>
                  </span>
                  <span class="post-meta-item-text">作者</span>
                  <span><a href="/authors/崔庆才" class="author" itemprop="url" rel="index">崔庆才</a></span>
                </span>
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-calendar"></i>
                  </span>
                  <span class="post-meta-item-text">发表于</span>
                  <time title="创建时间：2021-10-17 23:50:22" itemprop="dateCreated datePublished" datetime="2021-10-17T23:50:22+08:00">2021-10-17</time>
                </span>
                <span id="/31112.html" class="post-meta-item leancloud_visitors" data-flag-title="焦虑的一个原因：没有明确的短期计划和目标" title="阅读次数">
                  <span class="post-meta-item-icon">
                    <i class="fa fa-eye"></i>
                  </span>
                  <span class="post-meta-item-text">阅读次数：</span>
                  <span class="leancloud-visitors-count"></span>
                </span>
                <span class="post-meta-item" title="本文字数">
                  <span class="post-meta-item-icon">
                    <i class="far fa-file-word"></i>
                  </span>
                  <span class="post-meta-item-text">本文字数：</span>
                  <span>1.7k</span>
                </span>
                <span class="post-meta-item" title="阅读时长">
                  <span class="post-meta-item-icon">
                    <i class="far fa-clock"></i>
                  </span>
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                  <span>2 分钟</span>
                </span>
              </div>
            </article>
            <article itemscope itemtype="http://schema.org/Article" class="post-block index" lang="zh-CN">
              <link itemprop="mainEntityOfPage" href="https://cuiqingcai.com/31099.html">
              <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
                <meta itemprop="image" content="/images/avatar.png">
                <meta itemprop="name" content="崔庆才">
                <meta itemprop="description" content="崔庆才的个人站点，记录生活的瞬间，分享学习的心得。">
              </span>
              <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
                <meta itemprop="name" content="静觅">
              </span>
              <header class="post-header">
                <h2 class="post-title" itemprop="name headline">
                  <a class="label"> 安装配置 <i class="label-arrow"></i>
                  </a>
                  <a href="/31099.html" class="post-title-link" itemprop="url">Docker-Compose 的安装</a>
                </h2>
              </header>
              <div class="post-body" itemprop="articleBody">
                <div class="thumb">
                  <img itemprop="contentUrl" class="random">
                </div>
                <div class="excerpt">
                  <p>
                  <p>Compose 是用于定义和运行多容器 Docker 应用程序的工具。通过 Compose，您可以使用 YML 文件来配置应用程序需要的所有服务。然后，使用一个命令，就可以从 YML 文件配置中创建并启动所有服务。</p>
                  <p>如果你还不了解 YML 文件配置，可以先阅读 <a href="https://www.runoob.com/w3cnote/yaml-intro.html" target="_blank" rel="noopener">YAML 入门教程</a>。</p>
                  <p>Compose 使用的三个步骤：</p>
                  <ul>
                    <li>使用 Dockerfile 定义应用程序的环境。</li>
                    <li>使用 docker-compose.yml 定义构成应用程序的服务，这样它们可以在隔离环境中一起运行。</li>
                    <li>最后，执行 docker-compose up 命令来启动并运行整个应用程序。</li>
                  </ul>
                  <h2 id="安装"><a href="#安装" class="headerlink" title="安装"></a>安装</h2>
                  <p>当前，最新的 Docker 已经把 Compose 作为 Docker 的命令一部分了，可以直接安装 Docker：<a href="https://setup.scrape.center/docker" target="_blank" rel="noopener">https://setup.scrape.center/docker</a>。</p>
                  <p>另外如果要单独安装 Docker-Compose，可以参考 <a href="https://www.runoob.com/docker/docker-compose.html" target="_blank" rel="noopener">https://www.runoob.com/docker/docker-compose.html</a>。</p>
                  </p>
                </div>
              </div>
              <div class="post-meta">
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-user"></i>
                  </span>
                  <span class="post-meta-item-text">作者</span>
                  <span><a href="/authors/崔庆才" class="author" itemprop="url" rel="index">崔庆才</a></span>
                </span>
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-calendar"></i>
                  </span>
                  <span class="post-meta-item-text">发表于</span>
                  <time title="创建时间：2021-10-04 03:45:45" itemprop="dateCreated datePublished" datetime="2021-10-04T03:45:45+08:00">2021-10-04</time>
                </span>
                <span id="/31099.html" class="post-meta-item leancloud_visitors" data-flag-title="Docker-Compose 的安装" title="阅读次数">
                  <span class="post-meta-item-icon">
                    <i class="fa fa-eye"></i>
                  </span>
                  <span class="post-meta-item-text">阅读次数：</span>
                  <span class="leancloud-visitors-count"></span>
                </span>
                <span class="post-meta-item" title="本文字数">
                  <span class="post-meta-item-icon">
                    <i class="far fa-file-word"></i>
                  </span>
                  <span class="post-meta-item-text">本文字数：</span>
                  <span>416</span>
                </span>
                <span class="post-meta-item" title="阅读时长">
                  <span class="post-meta-item-icon">
                    <i class="far fa-clock"></i>
                  </span>
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                  <span>1 分钟</span>
                </span>
              </div>
            </article>
            <article itemscope itemtype="http://schema.org/Article" class="post-block index" lang="zh-CN">
              <link itemprop="mainEntityOfPage" href="https://cuiqingcai.com/31101.html">
              <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
                <meta itemprop="image" content="/images/avatar.png">
                <meta itemprop="name" content="崔庆才">
                <meta itemprop="description" content="崔庆才的个人站点，记录生活的瞬间，分享学习的心得。">
              </span>
              <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
                <meta itemprop="name" content="静觅">
              </span>
              <header class="post-header">
                <h2 class="post-title" itemprop="name headline">
                  <a class="label"> 安装配置 <i class="label-arrow"></i>
                  </a>
                  <a href="/31101.html" class="post-title-link" itemprop="url">Helm 的安装</a>
                </h2>
              </header>
              <div class="post-body" itemprop="articleBody">
                <div class="thumb">
                  <img itemprop="contentUrl" class="random">
                </div>
                <div class="excerpt">
                  <p>
                  <p>Helm 是 Kubernetes 的包管理器。</p>
                  <h2 id="相关链接"><a href="#相关链接" class="headerlink" title="相关链接"></a>相关链接</h2>
                  <ul>
                    <li>官网：<a href="https://helm.sh/" target="_blank" rel="noopener">https://helm.sh/</a></li>
                    <li>中文文档：<a href="https://helm.sh/zh/docs/" target="_blank" rel="noopener">https://helm.sh/zh/docs/</a></li>
                  </ul>
                  <p>该指南展示了如何安装 Helm CLI。Helm 可以用源码或构建的二进制版本安装。</p>
                  <p>下面的内容来自：<a href="https://helm.sh/zh/docs/intro/install/" target="_blank" rel="noopener">https://helm.sh/zh/docs/intro/install/</a>，最新内容以该链接为准。</p>
                  <h2 id="用-Helm-项目安装"><a href="#用-Helm-项目安装" class="headerlink" title="用 Helm 项目安装"></a>用 Helm 项目安装</h2>
                  <p>Helm 项目提供了两种获取和安装 Helm 的方式。这是官方提供的获取 Helm 发布版本的方法。另外， Helm 社区提供了通过不同包管理器安装 Helm 的方法。这些方法可以在下面的官方方法之后看到。</p>
                  <h3 id="用二进制版本安装"><a href="#用二进制版本安装" class="headerlink" title="用二进制版本安装"></a>用二进制版本安装</h3>
                  <p>每个 Helm <a href="https://github.com/helm/helm/releases" target="_blank" rel="noopener">版本</a>都提供了各种操作系统的二进制版本，这些版本可以手动下载和安装。</p>
                  <ol>
                    <li>下载 <a href="https://github.com/helm/helm/releases" target="_blank" rel="noopener">需要的版本</a></li>
                    <li>解压(<code>tar -zxvf helm-v3.0.0-linux-amd64.tar.gz</code>)</li>
                    <li>在解压目中找到<code>helm</code>程序，移动到需要的目录中(<code>mv linux-amd64/helm /usr/local/bin/helm</code>)</li>
                  </ol>
                  <p>然后就可以执行客户端程序并 <a href="https://helm.sh/zh/docs/intro/quickstart/#初始化" target="_blank" rel="noopener">添加稳定仓库</a>: <code>helm help</code>.</p>
                  <p><strong>注意</strong> 针对 Linux AMD64，Helm 的自动测试只有在 CircleCi 构建和发布时才会执行。测试其他操作系统是社区针对系统问题请求 Helm 的责任。</p>
                  <h3 id="使用脚本安装"><a href="#使用脚本安装" class="headerlink" title="使用脚本安装"></a>使用脚本安装</h3>
                  <p>Helm 现在有个安装脚本可以自动拉取最新的 Helm 版本并在 <a href="https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3" target="_blank" rel="noopener">本地安装</a>。</p>
                  <p>您可以获取这个脚本并在本地执行。它良好的文档会让您在执行之前知道脚本都做了什么。</p>
                  <figure class="highlight plain">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">$ curl -fsSL -o get_helm.sh https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;helm&#x2F;helm&#x2F;main&#x2F;scripts&#x2F;get-helm-3</span><br><span class="line">$ chmod 700 get_helm.sh</span><br><span class="line">$ .&#x2F;get_helm.sh</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>如果想直接执行安装，运行<code>curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash</code>。</p>
                  <h2 id="通过包管理器安装"><a href="#通过包管理器安装" class="headerlink" title="通过包管理器安装"></a>通过包管理器安装</h2>
                  <p>Helm 社区提供了通过操作系统包管理器安装 Helm 的方式。但 Helm 项目不支持且不认为是可信的第三方。</p>
                  <h3 id="使用-Homebrew-macOS"><a href="#使用-Homebrew-macOS" class="headerlink" title="使用 Homebrew (macOS)"></a>使用 Homebrew (macOS)</h3>
                  <p>Helm 社区成员贡献了一种在 Homebrew 构建 Helm 的方案，这个方案通常是最新的。</p>
                  <figure class="highlight plain">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">brew install helm</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>(注意：还有一个 emacs-helm 的方案，当然这是另一个项目了。)</p>
                  <h3 id="使用-Chocolatey-Windows"><a href="#使用-Chocolatey-Windows" class="headerlink" title="使用 Chocolatey (Windows)"></a>使用 Chocolatey (Windows)</h3>
                  <p>Helm 社区成员贡献了一个 <a href="https://chocolatey.org/packages/kubernetes-helm" target="_blank" rel="noopener">Helm 包</a>在 <a href="https://chocolatey.org/" target="_blank" rel="noopener">Chocolatey</a>中构建， 包通常是最新的。</p>
                  <figure class="highlight plain">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">choco install kubernetes-helm</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <h3 id="使用-Apt-Debian-Ubuntu"><a href="#使用-Apt-Debian-Ubuntu" class="headerlink" title="使用 Apt (Debian/Ubuntu)"></a>使用 Apt (Debian/Ubuntu)</h3>
                  <p>Helm 社区成员贡献了针对 Apt 的一个 <a href="https://helm.baltorepo.com/stable/debian/" target="_blank" rel="noopener">Helm 包</a>，包通常是最新的。</p>
                  <figure class="highlight plain">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">curl https:&#x2F;&#x2F;baltocdn.com&#x2F;helm&#x2F;signing.asc | sudo apt-key add -</span><br><span class="line">sudo apt-get install apt-transport-https --yes</span><br><span class="line">echo &quot;deb https:&#x2F;&#x2F;baltocdn.com&#x2F;helm&#x2F;stable&#x2F;debian&#x2F; all main&quot; | sudo tee &#x2F;etc&#x2F;apt&#x2F;sources.list.d&#x2F;helm-stable-debian.list</span><br><span class="line">sudo apt-get update</span><br><span class="line">sudo apt-get install helm</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <h3 id="使用-Snap"><a href="#使用-Snap" class="headerlink" title="使用 Snap"></a>使用 Snap</h3>
                  <p><a href="https://github.com/snapcrafters" target="_blank" rel="noopener">Snapcrafters</a>社区维护了 <a href="https://snapcraft.io/helm" target="_blank" rel="noopener">Helm 包</a>的 Snap 版本：</p>
                  <figure class="highlight plain">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">sudo snap install helm --classic</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <h3 id="使用-pkg-FreeBSD"><a href="#使用-pkg-FreeBSD" class="headerlink" title="使用 pkg (FreeBSD)"></a>使用 pkg (FreeBSD)</h3>
                  <p>FreeBSD 社区成员贡献了一个 <a href="https://www.freshports.org/sysutils/helm" target="_blank" rel="noopener">Helm 页面</a>来构建 <a href="https://man.freebsd.org/ports" target="_blank" rel="noopener">FreeBSD 端口集</a>。通常都是最新的包。</p>
                  <figure class="highlight plain">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">pkg install helm</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <h3 id="开发版本构建"><a href="#开发版本构建" class="headerlink" title="开发版本构建"></a>开发版本构建</h3>
                  <p>另外您可以下载和安装 Helm 的开发版本。</p>
                  <h3 id="使用-Canary-构建"><a href="#使用-Canary-构建" class="headerlink" title="使用 Canary 构建"></a>使用 Canary 构建</h3>
                  <p>“Canary”版本是从 Helm 最新的 master 分支构建。这些不是官方版本，可能不稳定。但是这提供测试边缘特性的条件。</p>
                  <p>Canary Helm 二进制包存储在 <a href="https://get.helm.sh/" target="_blank" rel="noopener">get.helm.sh</a>。以下是一般构建的链接：</p>
                  <ul>
                    <li><a href="https://get.helm.sh/helm-canary-linux-amd64.tar.gz" target="_blank" rel="noopener">Linux AMD64</a></li>
                    <li><a href="https://get.helm.sh/helm-canary-darwin-amd64.tar.gz" target="_blank" rel="noopener">macOS AMD64</a></li>
                    <li><a href="https://get.helm.sh/helm-canary-windows-amd64.zip" target="_blank" rel="noopener">实验性 Windows AMD64</a></li>
                  </ul>
                  <h3 id="使用源码-Source-Linux-macOS"><a href="#使用源码-Source-Linux-macOS" class="headerlink" title="使用源码 Source (Linux, macOS)"></a>使用源码 Source (Linux, macOS)</h3>
                  <p>从源码构建 Helm 的工作要稍微多一点，但如果你想测试最新（预发布）的 Helm 版本，这是最好的方式。</p>
                  <p>您必须有可用的 Go 环境。</p>
                  <figure class="highlight plain">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">$ git clone https:&#x2F;&#x2F;github.com&#x2F;helm&#x2F;helm.git</span><br><span class="line">$ cd helm</span><br><span class="line">$ make</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>如果需要，会拉取依赖并缓存，然后验证配置。然后会编译<code>helm</code>并放在<code>bin/helm</code>。</p>
                  <h2 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h2>
                  <p>大多数情况下，安装只需要简单地获取一个构建好的<code>helm</code>二进制包。本文档为想使用 Helm 做更复杂事情的人提供额外示例。</p>
                  <p>一旦你成功安装了 Helm 客户端，就可以继续使用 Helm 管理 chart 和 <a href="https://helm.sh/zh/docs/intro/quickstart/#初始化" target="_blank" rel="noopener">添加稳定的仓库</a>。</p>
                  </p>
                </div>
              </div>
              <div class="post-meta">
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-user"></i>
                  </span>
                  <span class="post-meta-item-text">作者</span>
                  <span><a href="/authors/崔庆才" class="author" itemprop="url" rel="index">崔庆才</a></span>
                </span>
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-calendar"></i>
                  </span>
                  <span class="post-meta-item-text">发表于</span>
                  <time title="创建时间：2021-10-04 03:45:45" itemprop="dateCreated datePublished" datetime="2021-10-04T03:45:45+08:00">2021-10-04</time>
                </span>
                <span id="/31101.html" class="post-meta-item leancloud_visitors" data-flag-title="Helm 的安装" title="阅读次数">
                  <span class="post-meta-item-icon">
                    <i class="fa fa-eye"></i>
                  </span>
                  <span class="post-meta-item-text">阅读次数：</span>
                  <span class="leancloud-visitors-count"></span>
                </span>
                <span class="post-meta-item" title="本文字数">
                  <span class="post-meta-item-icon">
                    <i class="far fa-file-word"></i>
                  </span>
                  <span class="post-meta-item-text">本文字数：</span>
                  <span>2.1k</span>
                </span>
                <span class="post-meta-item" title="阅读时长">
                  <span class="post-meta-item-icon">
                    <i class="far fa-clock"></i>
                  </span>
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                  <span>2 分钟</span>
                </span>
              </div>
            </article>
            <article itemscope itemtype="http://schema.org/Article" class="post-block index" lang="zh-CN">
              <link itemprop="mainEntityOfPage" href="https://cuiqingcai.com/31100.html">
              <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
                <meta itemprop="image" content="/images/avatar.png">
                <meta itemprop="name" content="崔庆才">
                <meta itemprop="description" content="崔庆才的个人站点，记录生活的瞬间，分享学习的心得。">
              </span>
              <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
                <meta itemprop="name" content="静觅">
              </span>
              <header class="post-header">
                <h2 class="post-title" itemprop="name headline">
                  <a class="label"> 安装配置 <i class="label-arrow"></i>
                  </a>
                  <a href="/31100.html" class="post-title-link" itemprop="url">Kubernetes 的安装</a>
                </h2>
              </header>
              <div class="post-body" itemprop="articleBody">
                <div class="thumb">
                  <img itemprop="contentUrl" class="random">
                </div>
                <div class="excerpt">
                  <p>
                  <p>Kubernetes，又被简称作 K8s（K 和 s 中间含有 8 个字母），它是用于编排容器化应用程序的云原生系统。Kubernetes 诞生自 Google，现在已经由 CNCF （云原生计算基金会）维护更新。Kubernetes 是目前最受欢迎的集群管理方案之一，可以非常容易地实现容器的管理编排。</p>
                  <p>刚刚我们提到，Kubernetes 是一个容器编排系统，对于“编排”二字，可能不太容易理解其中的含义。为了对它有更好的理解，我们先回过头来看看容器的定位是什么以及容器解决了什么问题，不能解决什么问题，然后我们再来了解下 Kubernetes 能够弥补容器哪些缺失的内容。</p>
                  <p>好，首先来看容器。最常见的容器技术就是 Docker 了，容器它提供了相比传统虚拟化技术更轻量级的机制来创建隔离的应用程序的运行环境。比如对于某个应用程序，我们使用容器运行时，不必担心它与宿主机之间产生资源冲突，不必担心多个容器之间产生资源冲突。同时借助于容器技术，我们还能更好地保证开发环境和生产环境的运行一致性。另外由于每个容器都是独立的，因此可以将多个容器运行在同一台宿主机上，以提高宿主机资源利用率，从而也进一步降低了成本。总之，使用容器带来的好处很多，可以为我们带来极大的便利。</p>
                  <p>不过单单依靠容器技术并不能解决所有的问题，也可以说容器技术也引入了新的问题，比如说：</p>
                  <ul>
                    <li>如果容器突然运行异常了怎么办？</li>
                    <li>如果容器所在的宿主机突然运行异常了怎么办？</li>
                    <li>如果有多个容器，他们之间怎么有效地传输数据？</li>
                    <li>如果单个容器达到了瓶颈，如何平稳且有效地进行扩容？</li>
                    <li>如果生产环境是由多台主机组成的，我们怎样更好地决定使用哪台主机来运行哪个容器？</li>
                  </ul>
                  <p>以上列举了一些单纯依靠容器技术或者单纯依靠 Docker 不能解决的问题，而 Kubernetes 作为容器编排平台，提供了一个可弹性运行的分布式系统框架，各个容器可以运行在 Kubernetes 平台上，容器的管理、调度、部署、扩容等各个操作都可以经由 Kubernetes 来有效实现。比如说，Kubernetes 可以管理单个容器的声明周期，并且可以根据需要来扩展和释放资源，如果某个容器意外关闭，Kubernetes 可以根据对应的策略选择重启该容器，以保证服务的正常运行。再比如说，Kubernetes 是一个分布式的平台，当容器所在的主机突然发生异常，Kubernetes 可以将异常主机上运行的容器转移到其他正常的主机上运行，另外 Kubernetes 还可以根据容器运行所需要占用的资源自动选择合适的主机来运行。总之，Kubernetes 对容器的调度和管理提供了非常强大的支持，可以帮我们解决上述的诸多问题。</p>
                  <h2 id="相关资料"><a href="#相关资料" class="headerlink" title="相关资料"></a>相关资料</h2>
                  <ul>
                    <li>官方文档：<a href="https://kubernetes.io/docs/home/" target="_blank" rel="noopener">https://kubernetes.io/docs/home/</a></li>
                  </ul>
                  <h2 id="安装方式"><a href="#安装方式" class="headerlink" title="安装方式"></a>安装方式</h2>
                  <p>安装 Kubernetes 有好多方式，比如 Minicube、Docker 自带、自建集群、云服务商提供。</p>
                  <h2 id="Minicube"><a href="#Minicube" class="headerlink" title="Minicube"></a>Minicube</h2>
                  <p>参考：<a href="https://kubernetes.io/docs/tutorials/hello-minikube/" target="_blank" rel="noopener">https://kubernetes.io/docs/tutorials/hello-minikube/</a></p>
                  <h2 id="Docker-自带"><a href="#Docker-自带" class="headerlink" title="Docker 自带"></a>Docker 自带</h2>
                  <p>现在 Docker for Windows 和 Docker for Mac 已经自带了 Kubernetes 的集群功能，只需要打开对应开关即可，如图所示：</p>
                  <p><img src="https://qiniu.cuiqingcai.com/2hm7d.png" alt="image-20211004003229922"></p>
                  <p>这里只需要把 Enable Kubernetes 勾选即可。</p>
                  <h2 id="集群搭建"><a href="#集群搭建" class="headerlink" title="集群搭建"></a>集群搭建</h2>
                  <p>搭建 Kubernetes 集群是比较麻烦的，参考链接：</p>
                  <ul>
                    <li><a href="https://segmentfault.com/a/1190000040107263" target="_blank" rel="noopener">https://segmentfault.com/a/1190000040107263</a></li>
                    <li><a href="https://kubernetes.io/zh/docs/setup/production-environment/tools/kubeadm/high-availability/" target="_blank" rel="noopener">https://kubernetes.io/zh/docs/setup/production-environment/tools/kubeadm/high-availability/</a></li>
                    <li><a href="https://www.kubernetes.org.cn/7315.html" target="_blank" rel="noopener">https://www.kubernetes.org.cn/7315.html</a></li>
                  </ul>
                  <h2 id="云服务商"><a href="#云服务商" class="headerlink" title="云服务商"></a>云服务商</h2>
                  <p>很多云服务商已经提供了 Kubernetes，请移步对应云服务商的功能支持说明，参考链接：</p>
                  <ul>
                    <li>Azure：<a href="https://azure.microsoft.com/en-us/services/kubernetes-service/" target="_blank" rel="noopener">https://azure.microsoft.com/en-us/services/kubernetes-service/</a></li>
                    <li>Google：<a href="https://cloud.google.com/kubernetes-engine" target="_blank" rel="noopener">https://cloud.google.com/kubernetes-engine</a></li>
                    <li>Amazon：<a href="https://aws.amazon.com/cn/eks/" target="_blank" rel="noopener">https://aws.amazon.com/cn/eks/</a></li>
                    <li>腾讯云：<a href="https://cloud.tencent.com/product/tke" target="_blank" rel="noopener">https://cloud.tencent.com/product/tke</a></li>
                    <li>阿里云：<a href="https://cn.aliyun.com/product/kubernetes" target="_blank" rel="noopener">https://cn.aliyun.com/product/kubernetes</a></li>
                    <li>华为云：<a href="https://support.huaweicloud.com/kubernetes.html" target="_blank" rel="noopener">https://support.huaweicloud.com/kubernetes.html</a></li>
                    <li>百度云：<a href="https://cloud.baidu.com/product/cce.html" target="_blank" rel="noopener">https://cloud.baidu.com/product/cce.html</a></li>
                  </ul>
                  </p>
                </div>
              </div>
              <div class="post-meta">
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-user"></i>
                  </span>
                  <span class="post-meta-item-text">作者</span>
                  <span><a href="/authors/崔庆才" class="author" itemprop="url" rel="index">崔庆才</a></span>
                </span>
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-calendar"></i>
                  </span>
                  <span class="post-meta-item-text">发表于</span>
                  <time title="创建时间：2021-10-04 03:45:45" itemprop="dateCreated datePublished" datetime="2021-10-04T03:45:45+08:00">2021-10-04</time>
                </span>
                <span id="/31100.html" class="post-meta-item leancloud_visitors" data-flag-title="Kubernetes 的安装" title="阅读次数">
                  <span class="post-meta-item-icon">
                    <i class="fa fa-eye"></i>
                  </span>
                  <span class="post-meta-item-text">阅读次数：</span>
                  <span class="leancloud-visitors-count"></span>
                </span>
                <span class="post-meta-item" title="本文字数">
                  <span class="post-meta-item-icon">
                    <i class="far fa-file-word"></i>
                  </span>
                  <span class="post-meta-item-text">本文字数：</span>
                  <span>1.9k</span>
                </span>
                <span class="post-meta-item" title="阅读时长">
                  <span class="post-meta-item-icon">
                    <i class="far fa-clock"></i>
                  </span>
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                  <span>2 分钟</span>
                </span>
              </div>
            </article>
            <article itemscope itemtype="http://schema.org/Article" class="post-block index" lang="zh-CN">
              <link itemprop="mainEntityOfPage" href="https://cuiqingcai.com/31098.html">
              <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
                <meta itemprop="image" content="/images/avatar.png">
                <meta itemprop="name" content="崔庆才">
                <meta itemprop="description" content="崔庆才的个人站点，记录生活的瞬间，分享学习的心得。">
              </span>
              <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
                <meta itemprop="name" content="静觅">
              </span>
              <header class="post-header">
                <h2 class="post-title" itemprop="name headline">
                  <a class="label"> 安装配置 <i class="label-arrow"></i>
                  </a>
                  <a href="/31098.html" class="post-title-link" itemprop="url">Splash 负载均衡配置</a>
                </h2>
              </header>
              <div class="post-body" itemprop="articleBody">
                <div class="thumb">
                  <img itemprop="contentUrl" class="random">
                </div>
                <div class="excerpt">
                  <p>
                  <p>用 Splash 做页面抓取时，如果爬取的量非常大，任务非常多，用一个 Splash 服务来处理的话，未免压力太大了，此时可以考虑搭建一个负载均衡器来把压力分散到各个服务器上。这相当于多台机器多个服务共同参与任务的处理，可以减小单个 Splash 服务的压力。</p>
                  <h2 id="配置-Splash-服务"><a href="#配置-Splash-服务" class="headerlink" title="配置 Splash 服务"></a>配置 Splash 服务</h2>
                  <p>要搭建 Splash 负载均衡，首先要有多个 Splash 服务。假如这里在 4 台远程主机的 8050 端口上都开启了 Splash 服务，它们的服务地址分别为 41.159.27.223:8050、41.159.27.221:8050、41.159.27.9:8050 和 41.159.117.119:8050，这 4 个服务完全一致，都是通过 Docker 的 Splash 镜像开启的。访问其中任何一个服务时，都可以使用 Splash 服务。</p>
                  <p>具体的 Splash 搭建流程可以参考：<a href="https://setup.scrape.center/splash" target="_blank" rel="noopener">https://setup.scrape.center/splash</a>。</p>
                  <h2 id="配置负载均衡"><a href="#配置负载均衡" class="headerlink" title="配置负载均衡"></a>配置负载均衡</h2>
                  <p>接下来，可以选用任意一台带有公网 IP 的主机来配置负载均衡。首先，在这台主机上装好 Nginx，然后修改 Nginx 的配置文件 nginx.conf，添加如下内容：</p>
                  <figure class="highlight python">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">http &#123;</span><br><span class="line">    upstream splash &#123;</span><br><span class="line">        least_conn;</span><br><span class="line">        server <span class="number">41.159</span><span class="number">.27</span><span class="number">.223</span>:<span class="number">8050</span>;</span><br><span class="line">        server <span class="number">41.159</span><span class="number">.27</span><span class="number">.221</span>:<span class="number">8050</span>;</span><br><span class="line">        server <span class="number">41.159</span><span class="number">.27</span><span class="number">.9</span>:<span class="number">8050</span>;</span><br><span class="line">        server <span class="number">41.159</span><span class="number">.117</span><span class="number">.119</span>:<span class="number">8050</span>;</span><br><span class="line">    &#125;</span><br><span class="line">    server &#123;</span><br><span class="line">        listen <span class="number">8050</span>;</span><br><span class="line">        location / &#123;proxy_pass http://splash;&#125;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>这样我们通过 <code>upstream</code> 字段定义了一个名字叫作 <code>splash</code> 的服务集群配置。其中 <code>least_conn</code> 代表最少链接负载均衡，它适合处理请求处理时间长短不一造成服务器过载的情况。</p>
                  <p>当然，我们也可以不指定配置，具体如下：</p>
                  <figure class="highlight python">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">upstream splash &#123;</span><br><span class="line">    server <span class="number">41.159</span><span class="number">.27</span><span class="number">.223</span>:<span class="number">8050</span>;</span><br><span class="line">    server <span class="number">41.159</span><span class="number">.27</span><span class="number">.221</span>:<span class="number">8050</span>;</span><br><span class="line">    server <span class="number">41.159</span><span class="number">.27</span><span class="number">.9</span>:<span class="number">8050</span>;</span><br><span class="line">    server <span class="number">41.159</span><span class="number">.117</span><span class="number">.119</span>:<span class="number">8050</span>;</span><br><span class="line">&#125;</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>这样默认以轮询策略实现负载均衡，每个服务器的压力相同。此策略适合服务器配置相当、无状态且短平快的服务使用。</p>
                  <p>另外，我们还可以指定权重，配置如下：</p>
                  <figure class="highlight python">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">upstream splash &#123;</span><br><span class="line">    server <span class="number">41.159</span><span class="number">.27</span><span class="number">.223</span>:<span class="number">8050</span> weight=<span class="number">4</span>;</span><br><span class="line">    server <span class="number">41.159</span><span class="number">.27</span><span class="number">.221</span>:<span class="number">8050</span> weight=<span class="number">2</span>;</span><br><span class="line">    server <span class="number">41.159</span><span class="number">.27</span><span class="number">.9</span>:<span class="number">8050</span> weight=<span class="number">2</span>;</span><br><span class="line">    server <span class="number">41.159</span><span class="number">.117</span><span class="number">.119</span>:<span class="number">8050</span> weight=<span class="number">1</span>;</span><br><span class="line">&#125;</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>这里 <code>weight</code> 参数指定各个服务的权重，权重越高，分配到处理的请求越多。假如不同的服务器配置差别比较大的话，可以使用此种配置。</p>
                  <p>最后，还有一种 IP 散列负载均衡，配置如下：</p>
                  <figure class="highlight python">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">upstream splash &#123;</span><br><span class="line">    ip_hash;</span><br><span class="line">    server <span class="number">41.159</span><span class="number">.27</span><span class="number">.223</span>:<span class="number">8050</span>;</span><br><span class="line">    server <span class="number">41.159</span><span class="number">.27</span><span class="number">.221</span>:<span class="number">8050</span>;</span><br><span class="line">    server <span class="number">41.159</span><span class="number">.27</span><span class="number">.9</span>:<span class="number">8050</span>;</span><br><span class="line">    server <span class="number">41.159</span><span class="number">.117</span><span class="number">.119</span>:<span class="number">8050</span>;</span><br><span class="line">&#125;</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>服务器根据请求客户端的 IP 地址进行散列计算，确保使用同一个服务器响应请求，这种策略适合有状态的服务，比如用户登录后访问某个页面的情形。对于 Splash 来说，不需要应用此设置。</p>
                  <p>我们可以根据不同的情形选用不同的配置，配置完成后重启一下 Nginx 服务：</p>
                  <figure class="highlight plain">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">sudo nginx -s reload</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>这样直接访问 Nginx 所在服务器的 8050 端口，即可实现负载均衡了。</p>
                  <h2 id="配置认证"><a href="#配置认证" class="headerlink" title="配置认证"></a>配置认证</h2>
                  <p>现在 Splash 是可以公开访问的，如果不想让其公开访问，还可以配置认证，这仍然借助于 Nginx。可以在 <code>server</code> 的 <code>location</code> 字段中添加 <code>auth_basic</code> 和 <code>auth_basic_user_file</code> 字段，具体配置如下：</p>
                  <figure class="highlight python">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">http &#123;</span><br><span class="line">    upstream splash &#123;</span><br><span class="line">        least_conn;</span><br><span class="line">        server <span class="number">41.159</span><span class="number">.27</span><span class="number">.223</span>:<span class="number">8050</span>;</span><br><span class="line">        server <span class="number">41.159</span><span class="number">.27</span><span class="number">.221</span>:<span class="number">8050</span>;</span><br><span class="line">        server <span class="number">41.159</span><span class="number">.27</span><span class="number">.9</span>:<span class="number">8050</span>;</span><br><span class="line">        server <span class="number">41.159</span><span class="number">.117</span><span class="number">.119</span>:<span class="number">8050</span>;</span><br><span class="line">    &#125;</span><br><span class="line">    server &#123;</span><br><span class="line">        listen <span class="number">8050</span>;</span><br><span class="line">        location / &#123;</span><br><span class="line">            proxy_pass http://splash;</span><br><span class="line">            auth_basic <span class="string">"Restricted"</span>;</span><br><span class="line">            auth_basic_user_file /etc/nginx/conf.d/.htpasswd;</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>这里使用的用户名和密码配置放置在 /etc/nginx/conf.d 目录下，我们需要使用 <code>htpasswd</code> 命令创建。例如，创建一个用户名为 <code>admin</code> 的文件，相关命令如下：</p>
                  <figure class="highlight plain">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">htpasswd -c .htpasswd admin</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>接下来，就会提示我们输入密码。输入两次之后，就会生成密码文件，其内容如下：</p>
                  <figure class="highlight plain">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br><span class="line">2</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">cat .htpasswd</span><br><span class="line">admin:5ZBxQr0rCqwbc</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>配置完成后重启一下 Nginx 服务，运行如下命令：</p>
                  <figure class="highlight plain">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">sudo nginx -s reload</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>这样访问认证就成功配置好了。</p>
                  <h2 id="测试"><a href="#测试" class="headerlink" title="测试"></a>测试</h2>
                  <p>最后，我们可以用代码来测试一下负载均衡的配置，看看到底是不是每次请求会切换 IP。利用 <a href="http://httpbin.org/get" target="_blank" rel="noopener">http://httpbin.org/get</a> 测试即可，实现代码如下：</p>
                  <figure class="highlight python">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line"><span class="keyword">import</span> requests</span><br><span class="line"><span class="keyword">from</span> urllib.parse <span class="keyword">import</span> quote</span><br><span class="line"><span class="keyword">import</span> re</span><br><span class="line"></span><br><span class="line">lua = <span class="string">'''</span></span><br><span class="line"><span class="string">function main(splash, args)</span></span><br><span class="line"><span class="string">  local treat = require("treat")</span></span><br><span class="line"><span class="string">  local response = splash:http_get("http://httpbin.org/get")</span></span><br><span class="line"><span class="string">  return treat.as_string(response.body)</span></span><br><span class="line"><span class="string">end</span></span><br><span class="line"><span class="string">'''</span></span><br><span class="line"></span><br><span class="line">url = <span class="string">'http://splash:8050/execute?lua_source='</span> + quote(lua)</span><br><span class="line">response = requests.get(url, auth=(<span class="string">'admin'</span>, <span class="string">'admin'</span>))</span><br><span class="line">ip = re.search(<span class="string">'(\d+\.\d+\.\d+\.\d+)'</span>, response.text).group(<span class="number">1</span>)</span><br><span class="line">print(ip)</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>这里 URL 中的 <code>splash</code> 字符串请自行替换成自己的 Nginx 服务器 IP。这里我修改了 Hosts，设置了 <code>splash</code> 为 Nginx 服务器 IP。</p>
                  <p>多次运行代码之后，可以发现每次请求的 IP 都会变化，比如第一次的结果：</p>
                  <figure class="highlight plain">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">41.159.27.223</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>第二次的结果：</p>
                  <figure class="highlight plain">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">41.159.27.9</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>这就说明负载均衡已经成功实现了，配置负载均衡后，可以多个 Splash 服务共同合作，减轻单个服务的负载，这还是比较有用的。</p>
                  <p>当然，我们也可以借助于 Kubernetes + Docker 来实现负载均衡，管理起来更加简单方便，感兴趣可以搜索相关内容试验一下。</p>
                  </p>
                </div>
              </div>
              <div class="post-meta">
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-user"></i>
                  </span>
                  <span class="post-meta-item-text">作者</span>
                  <span><a href="/authors/崔庆才" class="author" itemprop="url" rel="index">崔庆才</a></span>
                </span>
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-calendar"></i>
                  </span>
                  <span class="post-meta-item-text">发表于</span>
                  <time title="创建时间：2021-10-04 03:45:45" itemprop="dateCreated datePublished" datetime="2021-10-04T03:45:45+08:00">2021-10-04</time>
                </span>
                <span id="/31098.html" class="post-meta-item leancloud_visitors" data-flag-title="Splash 负载均衡配置" title="阅读次数">
                  <span class="post-meta-item-icon">
                    <i class="fa fa-eye"></i>
                  </span>
                  <span class="post-meta-item-text">阅读次数：</span>
                  <span class="leancloud-visitors-count"></span>
                </span>
                <span class="post-meta-item" title="本文字数">
                  <span class="post-meta-item-icon">
                    <i class="far fa-file-word"></i>
                  </span>
                  <span class="post-meta-item-text">本文字数：</span>
                  <span>3k</span>
                </span>
                <span class="post-meta-item" title="阅读时长">
                  <span class="post-meta-item-icon">
                    <i class="far fa-clock"></i>
                  </span>
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                  <span>3 分钟</span>
                </span>
              </div>
            </article>
            <article itemscope itemtype="http://schema.org/Article" class="post-block index" lang="zh-CN">
              <link itemprop="mainEntityOfPage" href="https://cuiqingcai.com/31102.html">
              <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
                <meta itemprop="image" content="/images/avatar.png">
                <meta itemprop="name" content="崔庆才">
                <meta itemprop="description" content="崔庆才的个人站点，记录生活的瞬间，分享学习的心得。">
              </span>
              <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
                <meta itemprop="name" content="静觅">
              </span>
              <header class="post-header">
                <h2 class="post-title" itemprop="name headline">
                  <a class="label"> 安装配置 <i class="label-arrow"></i>
                  </a>
                  <a href="/31102.html" class="post-title-link" itemprop="url">Tesserocr 的安装</a>
                </h2>
              </header>
              <div class="post-body" itemprop="articleBody">
                <div class="thumb">
                  <img itemprop="contentUrl" class="random">
                </div>
                <div class="excerpt">
                  <p>
                  <p>爬虫过程中难免会遇到各种各样的验证码，而大多数验证码还是图形验证码，这时候我们可以直接用 OCR 来识别。</p>
                  <h2 id="OCR"><a href="#OCR" class="headerlink" title="OCR"></a>OCR</h2>
                  <p>OCR，即 Optical Character Recognition，光学字符识别。是指通过扫描字符，然后通过其形状将其翻译成电子文本的过程。那么对于图形验证码来说，它都是一些不规则的字符，但是这些字符确实是由字符稍加扭曲变换得到的内容。</p>
                  <p>例如这样的验证码，如图所示：</p>
                  <p><img src="https://qiniu.cuiqingcai.com/obr8k.jpg" alt=""></p>
                  <p><img src="https://qiniu.cuiqingcai.com/wywci.jpg" alt=""></p>
                  <p>对于这种验证码，我们便可以使用 OCR 技术来将其转化为电子文本，然后爬虫将识别结果提交给服务器，便可以达到自动识别验证码的过程。</p>
                  <p>Tesserocr 是 Python 的一个 OCR 识别库，但其实是对 Tesseract 做的一层 Python API 封装，所以它的核心是 Tesseract，所以在安装 Tesserocr 之前我们需要先安装 Tesseract，本节我们来了解下它们的安装方式。</p>
                  <h2 id="相关链接"><a href="#相关链接" class="headerlink" title="相关链接"></a>相关链接</h2>
                  <ul>
                    <li>Tesserocr GitHub：<a href="https://github.com/sirfz/tesserocr" target="_blank" rel="noopener">https://github.com/sirfz/tesserocr</a></li>
                    <li>Tesserocr PyPi：<a href="https://pypi.python.org/pypi/tesserocr" target="_blank" rel="noopener">https://pypi.python.org/pypi/tesserocr</a></li>
                    <li>Tesseract 下载地址：<a href="http://digi.bib.uni-mannheim.de/tesseract" target="_blank" rel="noopener">http://digi.bib.uni-mannheim.de/tesseract</a></li>
                    <li>Tesseract GitHub：<a href="https://github.com/tesseract-ocr/tesseract" target="_blank" rel="noopener">https://github.com/tesseract-ocr/tesseract</a></li>
                    <li>Tesseract 语言包：<a href="https://github.com/tesseract-ocr/tessdata" target="_blank" rel="noopener">https://github.com/tesseract-ocr/tessdata</a></li>
                    <li>Tesseract 文档：<a href="https://github.com/tesseract-ocr/tesseract/wiki/Documentation" target="_blank" rel="noopener">https://github.com/tesseract-ocr/tesseract/wiki/Documentation</a></li>
                  </ul>
                  <h2 id="Windows-下的安装"><a href="#Windows-下的安装" class="headerlink" title="Windows 下的安装"></a>Windows 下的安装</h2>
                  <blockquote>
                    <p>本小节内容来自于：<a href="https://segmentfault.com/a/1190000039929696" target="_blank" rel="noopener">https://segmentfault.com/a/1190000039929696</a>，可以移步此链接查看原文。</p>
                  </blockquote>
                  <p>另外也可以查看其他博文，如：<a href="https://cloud.tencent.com/developer/article/1616037" target="_blank" rel="noopener">https://cloud.tencent.com/developer/article/1616037</a> 来安装和排查。</p>
                  <blockquote>
                    <p>为了增大成功安装的几率，推荐使用 Python 3.7 版本。</p>
                  </blockquote>
                  <p>在 Windows 下，首先需要下载 Tesseract，它为 Tesserocr 提供了支持，下载链接为：<a href="http://digi.bib.uni-mannheim.de/tesseract/" target="_blank" rel="noopener">http://digi.bib.uni-mannheim.de/tesseract/</a>。</p>
                  <p>点击进入之后可以看到有各种 exe 的下载列表，在这里可以选择下载 4.0 版本 tesseract-ocr-setup-4.00.00dev.exe，如图所示：</p>
                  <p><img src="https://qiniu.cuiqingcai.com/o6k97.png" alt=""></p>
                  <p>其中文件名中带有 dev 的为开发版本，不带 dev 的为稳定版本。</p>
                  <p>下载完成之后双击安装即可，在安装过程中可以勾选上 Additional language data 选项，安装 OCR 识别支持的语言包，这样 OCR 便可以识别多国语言。</p>
                  <p>复制你的安装路径，我的安装路径 D:\Python\Tesseract-OCR，界面如下：</p>
                  <p><img src="https://qiniu.cuiqingcai.com/vqr3e.png" alt=""></p>
                  <p>打开我的电脑系统属性-&gt;高级-&gt;环境变量，把该路径配置到环境变量：</p>
                  <p><img src="https://qiniu.cuiqingcai.com/gf5ml.png" alt=""></p>
                  <p>然后将下载好的字库放到 Tesseract-OCR 项目的 tessdata 文件夹里面。</p>
                  <p>接下来再安装 Tesserocr 即可，直接使用 Pip 安装：</p>
                  <figure class="highlight cmake">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">pip3 <span class="keyword">install</span> tesserocr pillow</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>另外如果安装过程中出现错误，请移步官方安装说明排查问题：<a href="https://github.com/sirfz/tesserocr" target="_blank" rel="noopener">https://github.com/sirfz/tesserocr</a>。</p>
                  <h2 id="Linux-下的安装"><a href="#Linux-下的安装" class="headerlink" title="Linux 下的安装"></a>Linux 下的安装</h2>
                  <p>对于 Linux 来说，不同系统已经有了不同的发行包了，它可能叫做 tesseract-ocr 或者 tesseract，直接用对应的命令安装即可。</p>
                  <h3 id="Ubuntu、Debian、Deepin"><a href="#Ubuntu、Debian、Deepin" class="headerlink" title="Ubuntu、Debian、Deepin"></a>Ubuntu、Debian、Deepin</h3>
                  <p>安装命令如下：</p>
                  <figure class="highlight q">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">sudo apt-<span class="built_in">get</span> install -y tesseract-ocr libtesseract-<span class="built_in">dev</span> libleptonica-<span class="built_in">dev</span></span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <h3 id="CentOS、RedHat"><a href="#CentOS、RedHat" class="headerlink" title="CentOS、RedHat"></a>CentOS、RedHat</h3>
                  <p>安装命令如下：</p>
                  <figure class="highlight cmake">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">yum <span class="keyword">install</span> -y tesseract</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>不同发行版本运行如上命令即可完成 Tesseract 的安装。</p>
                  <p>安装完成之后便可以调用 tesseract 命令了。</p>
                  <p>我们查看一下其支持的语言：</p>
                  <figure class="highlight ada">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">tesseract <span class="comment">--list-langs</span></span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>运行结果示例：</p>
                  <figure class="highlight angelscript">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">List of available languages (<span class="number">3</span>):</span><br><span class="line">eng</span><br><span class="line">osd</span><br><span class="line">equ</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>结果显示其只支持几种语言，如果我们想要安装多国语言还需要安装语言包，官方叫做 tessdata。</p>
                  <p>tessdata 的下载链接为：<a href="https://github.com/tesseract-ocr/tessdata" target="_blank" rel="noopener">https://github.com/tesseract-ocr/tessdata</a>。</p>
                  <p>利用 Git 命令将其下载下来并迁移到相关目录即可，不同的版本迁移命令如下：</p>
                  <h3 id="Ubuntu、Debian、Deepin-1"><a href="#Ubuntu、Debian、Deepin-1" class="headerlink" title="Ubuntu、Debian、Deepin"></a>Ubuntu、Debian、Deepin</h3>
                  <figure class="highlight awk">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br><span class="line">2</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">git clone https:<span class="regexp">//gi</span>thub.com<span class="regexp">/tesseract-ocr/</span>tessdata.git</span><br><span class="line">sudo mv tessdata<span class="regexp">/* /u</span>sr<span class="regexp">/share/</span>tesseract-ocr<span class="regexp">/tessdata</span></span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <h3 id="CentOS、RedHat-1"><a href="#CentOS、RedHat-1" class="headerlink" title="CentOS、RedHat"></a>CentOS、RedHat</h3>
                  <figure class="highlight awk">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br><span class="line">2</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">git clone https:<span class="regexp">//gi</span>thub.com<span class="regexp">/tesseract-ocr/</span>tessdata.git</span><br><span class="line">sudo mv tessdata<span class="regexp">/* /u</span>sr<span class="regexp">/share/</span>tesseract<span class="regexp">/tessdata</span></span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>这样就可以将下载下来的语言包全部安装了。</p>
                  <p>这时我们重新运行列出所有语言的命令：</p>
                  <figure class="highlight ada">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">tesseract <span class="comment">--list-langs</span></span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>结果如下：</p>
                  <figure class="highlight armasm">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line"><span class="symbol">List</span> of available languages (<span class="number">107</span>):</span><br><span class="line"><span class="symbol">afr</span></span><br><span class="line"><span class="symbol">amh</span></span><br><span class="line"><span class="symbol">ara</span></span><br><span class="line"><span class="symbol">asm</span></span><br><span class="line"><span class="symbol">aze</span></span><br><span class="line"><span class="symbol">aze_cyrl</span></span><br><span class="line"><span class="keyword">bel</span></span><br><span class="line"><span class="keyword">ben</span></span><br><span class="line"><span class="keyword">bod</span></span><br><span class="line"><span class="keyword">bos</span></span><br><span class="line"><span class="keyword">bul</span></span><br><span class="line"><span class="keyword">cat</span></span><br><span class="line"><span class="keyword">ceb</span></span><br><span class="line"><span class="keyword">ces</span></span><br><span class="line"><span class="keyword">chi_sim</span></span><br><span class="line"><span class="keyword">chi_tra</span></span><br><span class="line"><span class="keyword">...</span></span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>即可发现其列出的语言就多了非常多，比如 chi_sim 就代表简体中文，这就证明语言包安装成功了。</p>
                  <p>接下来再安装 Tesserocr 即可，直接使用 Pip 安装：</p>
                  <figure class="highlight cmake">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">pip3 <span class="keyword">install</span> tesserocr pillow</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <h2 id="Mac-下的安装"><a href="#Mac-下的安装" class="headerlink" title="Mac 下的安装"></a>Mac 下的安装</h2>
                  <p>Mac 下首先使用 Homebrew 安装 Imagemagick 和 Tesseract 库：</p>
                  <figure class="highlight mipsasm">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br><span class="line">2</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line"><span class="keyword">brew </span><span class="keyword">install </span>imagemagick</span><br><span class="line"><span class="keyword">brew </span><span class="keyword">install </span>tesseract --all-languages</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>接下来再安装 Tesserocr 即可：</p>
                  <figure class="highlight cmake">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">pip3 <span class="keyword">install</span> tesserocr pillow</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>这样我们便完成了 Tesserocr 的安装。</p>
                  <h2 id="验证安装"><a href="#验证安装" class="headerlink" title="验证安装"></a>验证安装</h2>
                  <p>接下来我们可以使用 Tesseract 和 Tesserocr 来分别进行测试。</p>
                  <p>下面我们以如下的图片为样例进行测试，如图所示：</p>
                  <p><img src="https://qiniu.cuiqingcai.com/sk256.jpg" alt=""></p>
                  <p>图片链接为：<a href="https://raw.githubusercontent.com/Python3WebSpider/TestTess/master/image.png" target="_blank" rel="noopener">https://raw.githubusercontent.com/Python3WebSpider/TestTess/master/image.png</a>，可以直接保存或下载。</p>
                  <p>我们首先用命令行进行测试，将图片下载保存为 image.png，然后用 Tesseract 命令行测试，命令如下：</p>
                  <figure class="highlight applescript">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">tesseract image.png <span class="literal">result</span> -l eng &amp;&amp; cat <span class="literal">result</span>.txt</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>运行结果：</p>
                  <figure class="highlight angelscript">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br><span class="line">2</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">Tesseract Open Source OCR Engine v3<span class="number">.05</span><span class="number">.01</span> with Leptonica</span><br><span class="line">Python3WebSpider</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>我们调用了 tesseract 命令，第一个参数为图片名称，第二个参数 result 为结果保存的目标文件名称，-l 指定使用的语言包，在此使用 eng 英文，然后再用 cat 命令将结果输出。</p>
                  <p>第二行的运行结果便是图片的识别结果，Python3WebSpider。</p>
                  <p>我们可以看到这时已经成功将图片文字转为电子文本了。</p>
                  <p>然后我们还可以利用 Python 代码来测试，这里就需要借助于 Tesserocr 库了，测试代码如下：</p>
                  <figure class="highlight python">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line"><span class="keyword">import</span> tesserocr</span><br><span class="line"><span class="keyword">from</span> PIL <span class="keyword">import</span> Image</span><br><span class="line">image = Image.open(<span class="string">'image.png'</span>)</span><br><span class="line">print(tesserocr.image_to_text(image))</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>在这里我们首先利用 Image 读取了图片文件，然后调用了 tesserocr 的 image_to_text() 方法，再将将其识别结果输出。</p>
                  <p>运行结果：</p>
                  <figure class="highlight gcode">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">Pytho<span class="symbol">n3</span>WebSpider</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>另外我们还可以直接调用 file_to_text() 方法，也可以达到同样的效果：</p>
                  <figure class="highlight python">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br><span class="line">2</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line"><span class="keyword">import</span> tesserocr</span><br><span class="line">print(tesserocr.file_to_text(<span class="string">'image.png'</span>))</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>运行结果：</p>
                  <figure class="highlight gcode">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">Pytho<span class="symbol">n3</span>WebSpider</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>如果成功输出结果，则证明 Tesseract 和 Tesserocr 都已经安装成功。</p>
                  </p>
                </div>
              </div>
              <div class="post-meta">
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-user"></i>
                  </span>
                  <span class="post-meta-item-text">作者</span>
                  <span><a href="/authors/崔庆才" class="author" itemprop="url" rel="index">崔庆才</a></span>
                </span>
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-calendar"></i>
                  </span>
                  <span class="post-meta-item-text">发表于</span>
                  <time title="创建时间：2021-10-04 03:45:45" itemprop="dateCreated datePublished" datetime="2021-10-04T03:45:45+08:00">2021-10-04</time>
                </span>
                <span id="/31102.html" class="post-meta-item leancloud_visitors" data-flag-title="Tesserocr 的安装" title="阅读次数">
                  <span class="post-meta-item-icon">
                    <i class="fa fa-eye"></i>
                  </span>
                  <span class="post-meta-item-text">阅读次数：</span>
                  <span class="leancloud-visitors-count"></span>
                </span>
                <span class="post-meta-item" title="本文字数">
                  <span class="post-meta-item-icon">
                    <i class="far fa-file-word"></i>
                  </span>
                  <span class="post-meta-item-text">本文字数：</span>
                  <span>3.5k</span>
                </span>
                <span class="post-meta-item" title="阅读时长">
                  <span class="post-meta-item-icon">
                    <i class="far fa-clock"></i>
                  </span>
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                  <span>3 分钟</span>
                </span>
              </div>
            </article>
            <article itemscope itemtype="http://schema.org/Article" class="post-block index" lang="zh-CN">
              <link itemprop="mainEntityOfPage" href="https://cuiqingcai.com/31096.html">
              <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
                <meta itemprop="image" content="/images/avatar.png">
                <meta itemprop="name" content="崔庆才">
                <meta itemprop="description" content="崔庆才的个人站点，记录生活的瞬间，分享学习的心得。">
              </span>
              <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
                <meta itemprop="name" content="静觅">
              </span>
              <header class="post-header">
                <h2 class="post-title" itemprop="name headline">
                  <a class="label"> 安装配置 <i class="label-arrow"></i>
                  </a>
                  <a href="/31096.html" class="post-title-link" itemprop="url">Frida 的安装</a>
                </h2>
              </header>
              <div class="post-body" itemprop="articleBody">
                <div class="thumb">
                  <img itemprop="contentUrl" class="random">
                </div>
                <div class="excerpt">
                  <p>
                  <p>Frida 是一个基于 Python 和 JavaScript 的 Hook 与调试框架，是一款易用的跨平台 Hook 工具，无 论 Java 层的逻辑，还是 Native 层的逻辑，它都可以 Hook。Frida 可以把代码插入原生 App 的内存空 间，然后动态地监视和修改其行为，支持 Windows、Mac、Linux、Android、iOS 全平台。</p>
                  <h2 id="相关链接"><a href="#相关链接" class="headerlink" title="相关链接"></a>相关链接</h2>
                  <ul>
                    <li>官网：<a href="https://frida.re/" target="_blank" rel="noopener">https://frida.re/</a></li>
                    <li>GitHub：<a href="https://github.com/frida/frida" target="_blank" rel="noopener">https://github.com/frida/frida</a></li>
                  </ul>
                  <h2 id="安装"><a href="#安装" class="headerlink" title="安装"></a>安装</h2>
                  <h3 id="pip-安装"><a href="#pip-安装" class="headerlink" title="pip 安装"></a>pip 安装</h3>
                  <p>推荐使用 pip3 安装，命令如下：</p>
                  <figure class="highlight cmake">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">pip3 <span class="keyword">install</span> frida frida-tools</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>命令执行完毕之后即可完成安装。</p>
                  <h2 id="验证安装"><a href="#验证安装" class="headerlink" title="验证安装"></a>验证安装</h2>
                  <p>安装完成之后，可以在 Python 命令行下测试。</p>
                  <figure class="highlight python">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br><span class="line">2</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">$ python3</span><br><span class="line"><span class="meta">&gt;&gt;&gt; </span><span class="keyword">import</span> frida</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>如果没有错误报出，则证明库已经安装好了。</p>
                  <p>更多安装说明参考：<a href="https://frida.re/docs/installation/" target="_blank" rel="noopener">https://frida.re/docs/installation/</a></p>
                  </p>
                </div>
              </div>
              <div class="post-meta">
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-user"></i>
                  </span>
                  <span class="post-meta-item-text">作者</span>
                  <span><a href="/authors/崔庆才" class="author" itemprop="url" rel="index">崔庆才</a></span>
                </span>
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-calendar"></i>
                  </span>
                  <span class="post-meta-item-text">发表于</span>
                  <time title="创建时间：2021-10-04 03:44:45" itemprop="dateCreated datePublished" datetime="2021-10-04T03:44:45+08:00">2021-10-04</time>
                </span>
                <span id="/31096.html" class="post-meta-item leancloud_visitors" data-flag-title="Frida 的安装" title="阅读次数">
                  <span class="post-meta-item-icon">
                    <i class="fa fa-eye"></i>
                  </span>
                  <span class="post-meta-item-text">阅读次数：</span>
                  <span class="leancloud-visitors-count"></span>
                </span>
                <span class="post-meta-item" title="本文字数">
                  <span class="post-meta-item-icon">
                    <i class="far fa-file-word"></i>
                  </span>
                  <span class="post-meta-item-text">本文字数：</span>
                  <span>410</span>
                </span>
                <span class="post-meta-item" title="阅读时长">
                  <span class="post-meta-item-icon">
                    <i class="far fa-clock"></i>
                  </span>
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                  <span>1 分钟</span>
                </span>
              </div>
            </article>
            <article itemscope itemtype="http://schema.org/Article" class="post-block index" lang="zh-CN">
              <link itemprop="mainEntityOfPage" href="https://cuiqingcai.com/31097.html">
              <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
                <meta itemprop="image" content="/images/avatar.png">
                <meta itemprop="name" content="崔庆才">
                <meta itemprop="description" content="崔庆才的个人站点，记录生活的瞬间，分享学习的心得。">
              </span>
              <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
                <meta itemprop="name" content="静觅">
              </span>
              <header class="post-header">
                <h2 class="post-title" itemprop="name headline">
                  <a class="label"> 安装配置 <i class="label-arrow"></i>
                  </a>
                  <a href="/31097.html" class="post-title-link" itemprop="url">IDA Pro 的安装</a>
                </h2>
              </header>
              <div class="post-body" itemprop="articleBody">
                <div class="thumb">
                  <img itemprop="contentUrl" class="random">
                </div>
                <div class="excerpt">
                  <p>
                  <p>IDA Pro 的英文全称是 Interactive Disassembler Professional，即交互式反汇编器专业版，大家也称 之为 IDA。它由一家总部位于比利时的 Hex-Rayd 公司开发，功能十分强大，是目前流行的反汇编软 件之一，也是安全分析人士必备的一款软件。</p>
                  <p>IDA Pro 最重要的功能便是可以将二进制文件中的机器代码(如 010101)转化成汇编代码，甚至 可以进一步根据汇编代码的执行逻辑还原出高级语言(如 C/C++)编写的代码，从而大大提高代码的 可读性。IDA Pro 不仅仅局限于分析 Android 中的 so 文件，它可以处理和分析几乎所有的二进制文件， Windows、DOS、Unix、Linux、Mac、Java、.NET 等平台的二进制文件都不在话下。另外，IDA Pro 提 供了图形界面和强大的调试功能，利用它我们可以直观地实时调试和分析二进制文件。除了这些，IDA Pro 还提供开放式的插件架构，我们可以编写自定义的插件轻松扩展其功能。</p>
                  <p>总之，IDA Pro 是一款极其强大的反汇编软件，已经成为业界安全分析必不可少的一个工具，更多介绍可以查看 IDA Pro 的官网。</p>
                  <h2 id="安装"><a href="#安装" class="headerlink" title="安装"></a>安装</h2>
                  <p>IDA Pro 是收费的，但是有不少大佬已经破解了，可以移步相关资源查看：<a href="https://bbs.pediy.com/thread-263559.htm" target="_blank" rel="noopener">https://bbs.pediy.com/thread-263559.htm</a>。</p>
                  <p>其他的安装教程：</p>
                  <ul>
                    <li><a href="https://blog.csdn.net/qq_34732729/article/details/109184623" target="_blank" rel="noopener">https://blog.csdn.net/qq_34732729/article/details/109184623</a></li>
                    <li><a href="https://www.bilibili.com/video/BV1uA411V7LK/" target="_blank" rel="noopener">https://www.bilibili.com/video/BV1uA411V7LK/</a></li>
                  </ul>
                  </p>
                </div>
              </div>
              <div class="post-meta">
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-user"></i>
                  </span>
                  <span class="post-meta-item-text">作者</span>
                  <span><a href="/authors/崔庆才" class="author" itemprop="url" rel="index">崔庆才</a></span>
                </span>
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-calendar"></i>
                  </span>
                  <span class="post-meta-item-text">发表于</span>
                  <time title="创建时间：2021-10-04 03:44:45" itemprop="dateCreated datePublished" datetime="2021-10-04T03:44:45+08:00">2021-10-04</time>
                </span>
                <span id="/31097.html" class="post-meta-item leancloud_visitors" data-flag-title="IDA Pro 的安装" title="阅读次数">
                  <span class="post-meta-item-icon">
                    <i class="fa fa-eye"></i>
                  </span>
                  <span class="post-meta-item-text">阅读次数：</span>
                  <span class="leancloud-visitors-count"></span>
                </span>
                <span class="post-meta-item" title="本文字数">
                  <span class="post-meta-item-icon">
                    <i class="far fa-file-word"></i>
                  </span>
                  <span class="post-meta-item-text">本文字数：</span>
                  <span>667</span>
                </span>
                <span class="post-meta-item" title="阅读时长">
                  <span class="post-meta-item-icon">
                    <i class="far fa-clock"></i>
                  </span>
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                  <span>1 分钟</span>
                </span>
              </div>
            </article>
            <article itemscope itemtype="http://schema.org/Article" class="post-block index" lang="zh-CN">
              <link itemprop="mainEntityOfPage" href="https://cuiqingcai.com/31095.html">
              <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
                <meta itemprop="image" content="/images/avatar.png">
                <meta itemprop="name" content="崔庆才">
                <meta itemprop="description" content="崔庆才的个人站点，记录生活的瞬间，分享学习的心得。">
              </span>
              <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
                <meta itemprop="name" content="静觅">
              </span>
              <header class="post-header">
                <h2 class="post-title" itemprop="name headline">
                  <a class="label"> 安装配置 <i class="label-arrow"></i>
                  </a>
                  <a href="/31095.html" class="post-title-link" itemprop="url">VirtualXposed 的安装</a>
                </h2>
              </header>
              <div class="post-body" itemprop="articleBody">
                <div class="thumb">
                  <img itemprop="contentUrl" class="random">
                </div>
                <div class="excerpt">
                  <p>
                  <p><strong>VirtualXposed</strong> 是基于<a href="https://github.com/asLody/VirtualApp" target="_blank" rel="noopener">VirtualApp</a> 和 <a href="https://github.com/tiann/epic" target="_blank" rel="noopener">epic</a> 在<strong>非 ROOT</strong>环境下运行 Xposed 模块的实现（支持 5.0~10.0)。</p>
                  <p>与 Xposed 相比，目前 VirtualXposed 有两个限制：</p>
                  <ol>
                    <li>不支持修改系统（可以修改普通 APP 中对系统 API 的调用），因此重力工具箱，应用控制器等无法使用。</li>
                    <li>暂不支持资源 HOOK，因此资源钩子不会起任何作用；使用资源 HOOK 的模块，相应的功能不会生效。</li>
                  </ol>
                  <h2 id="相关链接"><a href="#相关链接" class="headerlink" title="相关链接"></a>相关链接</h2>
                  <ul>
                    <li>官网：<a href="https://vxp.app/" target="_blank" rel="noopener">https://vxp.app/</a></li>
                    <li>GitHub：<a href="https://github.com/android-hacker/VirtualXposed" target="_blank" rel="noopener">https://github.com/android-hacker/VirtualXposed</a></li>
                    <li>中文文档：<a href="https://github.com/android-hacker/VirtualXposed/blob/vxp/CHINESE.md" target="_blank" rel="noopener">https://github.com/android-hacker/VirtualXposed/blob/vxp/CHINESE.md</a></li>
                  </ul>
                  <h2 id="安装"><a href="#安装" class="headerlink" title="安装"></a>安装</h2>
                  <p>可以到 <a href="https://github.com/android-hacker/VirtualXposed/releases" target="_blank" rel="noopener">https://github.com/android-hacker/VirtualXposed/releases</a> 下载最新的安装包，如图所示：</p>
                  <p><img src="assets/image-20211004001344424.png" alt="image-20211004001344424"></p>
                  <p>下载下来 apk 之后直接安装即可：</p>
                  <figure class="highlight css">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line"><span class="selector-tag">adb</span> <span class="selector-tag">install</span> <span class="selector-tag">VirtualXposed_0</span><span class="selector-class">.20</span><span class="selector-class">.3</span><span class="selector-class">.apk</span></span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>使用说明见：<a href="https://vxposed.com/，中文文档见：" target="_blank" rel="noopener">https://vxposed.com/，中文文档见：</a><a href="https://github.com/android-hacker/VirtualXposed/blob/vxp/CHINESE.md" target="_blank" rel="noopener">https://github.com/android-hacker/VirtualXposed/blob/vxp/CHINESE.md</a>。</p>
                  </p>
                </div>
              </div>
              <div class="post-meta">
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-user"></i>
                  </span>
                  <span class="post-meta-item-text">作者</span>
                  <span><a href="/authors/崔庆才" class="author" itemprop="url" rel="index">崔庆才</a></span>
                </span>
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-calendar"></i>
                  </span>
                  <span class="post-meta-item-text">发表于</span>
                  <time title="创建时间：2021-10-04 03:44:45" itemprop="dateCreated datePublished" datetime="2021-10-04T03:44:45+08:00">2021-10-04</time>
                </span>
                <span id="/31095.html" class="post-meta-item leancloud_visitors" data-flag-title="VirtualXposed 的安装" title="阅读次数">
                  <span class="post-meta-item-icon">
                    <i class="fa fa-eye"></i>
                  </span>
                  <span class="post-meta-item-text">阅读次数：</span>
                  <span class="leancloud-visitors-count"></span>
                </span>
                <span class="post-meta-item" title="本文字数">
                  <span class="post-meta-item-icon">
                    <i class="far fa-file-word"></i>
                  </span>
                  <span class="post-meta-item-text">本文字数：</span>
                  <span>568</span>
                </span>
                <span class="post-meta-item" title="阅读时长">
                  <span class="post-meta-item-icon">
                    <i class="far fa-clock"></i>
                  </span>
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                  <span>1 分钟</span>
                </span>
              </div>
            </article>
            <article itemscope itemtype="http://schema.org/Article" class="post-block index" lang="zh-CN">
              <link itemprop="mainEntityOfPage" href="https://cuiqingcai.com/31093.html">
              <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
                <meta itemprop="image" content="/images/avatar.png">
                <meta itemprop="name" content="崔庆才">
                <meta itemprop="description" content="崔庆才的个人站点，记录生活的瞬间，分享学习的心得。">
              </span>
              <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
                <meta itemprop="name" content="静觅">
              </span>
              <header class="post-header">
                <h2 class="post-title" itemprop="name headline">
                  <a class="label"> 安装配置 <i class="label-arrow"></i>
                  </a>
                  <a href="/31093.html" class="post-title-link" itemprop="url">Android 开发环境搭建</a>
                </h2>
              </header>
              <div class="post-body" itemprop="articleBody">
                <div class="thumb">
                  <img itemprop="contentUrl" class="random">
                </div>
                <div class="excerpt">
                  <p>
                  <p>强烈建议看官方文档：<a href="https://developer.android.com/guide" target="_blank" rel="noopener">https://developer.android.com/guide</a>，因为这才是原汁原味的搭建流程指导。</p>
                  <p>一些中文教程也有，2021 年请移步：</p>
                  <ul>
                    <li><a href="https://www.cnblogs.com/kiba/p/14830060.html" target="_blank" rel="noopener">https://www.cnblogs.com/kiba/p/14830060.html</a></li>
                    <li><a href="https://www.jianshu.com/p/690a69bc031b" target="_blank" rel="noopener">https://www.jianshu.com/p/690a69bc031b</a></li>
                  </ul>
                  </p>
                </div>
              </div>
              <div class="post-meta">
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-user"></i>
                  </span>
                  <span class="post-meta-item-text">作者</span>
                  <span><a href="/authors/崔庆才" class="author" itemprop="url" rel="index">崔庆才</a></span>
                </span>
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-calendar"></i>
                  </span>
                  <span class="post-meta-item-text">发表于</span>
                  <time title="创建时间：2021-10-04 02:44:45" itemprop="dateCreated datePublished" datetime="2021-10-04T02:44:45+08:00">2021-10-04</time>
                </span>
                <span id="/31093.html" class="post-meta-item leancloud_visitors" data-flag-title="Android 开发环境搭建" title="阅读次数">
                  <span class="post-meta-item-icon">
                    <i class="fa fa-eye"></i>
                  </span>
                  <span class="post-meta-item-text">阅读次数：</span>
                  <span class="leancloud-visitors-count"></span>
                </span>
                <span class="post-meta-item" title="本文字数">
                  <span class="post-meta-item-icon">
                    <i class="far fa-file-word"></i>
                  </span>
                  <span class="post-meta-item-text">本文字数：</span>
                  <span>163</span>
                </span>
                <span class="post-meta-item" title="阅读时长">
                  <span class="post-meta-item-icon">
                    <i class="far fa-clock"></i>
                  </span>
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                  <span>1 分钟</span>
                </span>
              </div>
            </article>
            <article itemscope itemtype="http://schema.org/Article" class="post-block index" lang="zh-CN">
              <link itemprop="mainEntityOfPage" href="https://cuiqingcai.com/31094.html">
              <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
                <meta itemprop="image" content="/images/avatar.png">
                <meta itemprop="name" content="崔庆才">
                <meta itemprop="description" content="崔庆才的个人站点，记录生活的瞬间，分享学习的心得。">
              </span>
              <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
                <meta itemprop="name" content="静觅">
              </span>
              <header class="post-header">
                <h2 class="post-title" itemprop="name headline">
                  <a class="label"> 安装配置 <i class="label-arrow"></i>
                  </a>
                  <a href="/31094.html" class="post-title-link" itemprop="url">EdXposed 的安装</a>
                </h2>
              </header>
              <div class="post-body" itemprop="articleBody">
                <div class="thumb">
                  <img itemprop="contentUrl" class="random">
                </div>
                <div class="excerpt">
                  <p>
                  <p>EdXposed 在 Xposed 的基础上提供了 Android 8.0+ 的支持，同时提供了白名单、黑名单、兼容模式、无需重启等特性。</p>
                  <p><img src="https://qiniu.cuiqingcai.com/pzy9f.png" alt=""></p>
                  <h2 id="相关链接"><a href="#相关链接" class="headerlink" title="相关链接"></a>相关链接</h2>
                  <ul>
                    <li>官网：<a href="https://edxp.meowcat.org/" target="_blank" rel="noopener">https://edxp.meowcat.org/</a></li>
                    <li>GitHub：<a href="https://github.com/ElderDrivers/EdXposed" target="_blank" rel="noopener">https://github.com/ElderDrivers/EdXposed</a></li>
                  </ul>
                  <h2 id="安装"><a href="#安装" class="headerlink" title="安装"></a>安装</h2>
                  <p>由于 EdXposed 一直在更新，请移步最新官方文档 <a href="https://edxp.meowcat.org/" target="_blank" rel="noopener">https://edxp.meowcat.org/</a> 查看最新安装说明：</p>
                  <p><img src="https://qiniu.cuiqingcai.com/htg2v.png" alt=""></p>
                  </p>
                </div>
              </div>
              <div class="post-meta">
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-user"></i>
                  </span>
                  <span class="post-meta-item-text">作者</span>
                  <span><a href="/authors/崔庆才" class="author" itemprop="url" rel="index">崔庆才</a></span>
                </span>
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-calendar"></i>
                  </span>
                  <span class="post-meta-item-text">发表于</span>
                  <time title="创建时间：2021-10-04 02:44:45" itemprop="dateCreated datePublished" datetime="2021-10-04T02:44:45+08:00">2021-10-04</time>
                </span>
                <span id="/31094.html" class="post-meta-item leancloud_visitors" data-flag-title="EdXposed 的安装" title="阅读次数">
                  <span class="post-meta-item-icon">
                    <i class="fa fa-eye"></i>
                  </span>
                  <span class="post-meta-item-text">阅读次数：</span>
                  <span class="leancloud-visitors-count"></span>
                </span>
                <span class="post-meta-item" title="本文字数">
                  <span class="post-meta-item-icon">
                    <i class="far fa-file-word"></i>
                  </span>
                  <span class="post-meta-item-text">本文字数：</span>
                  <span>203</span>
                </span>
                <span class="post-meta-item" title="阅读时长">
                  <span class="post-meta-item-icon">
                    <i class="far fa-clock"></i>
                  </span>
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                  <span>1 分钟</span>
                </span>
              </div>
            </article>
            <article itemscope itemtype="http://schema.org/Article" class="post-block index" lang="zh-CN">
              <link itemprop="mainEntityOfPage" href="https://cuiqingcai.com/31092.html">
              <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
                <meta itemprop="image" content="/images/avatar.png">
                <meta itemprop="name" content="崔庆才">
                <meta itemprop="description" content="崔庆才的个人站点，记录生活的瞬间，分享学习的心得。">
              </span>
              <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
                <meta itemprop="name" content="静觅">
              </span>
              <header class="post-header">
                <h2 class="post-title" itemprop="name headline">
                  <a class="label"> 安装配置 <i class="label-arrow"></i>
                  </a>
                  <a href="/31092.html" class="post-title-link" itemprop="url">PyExecJS 库的安装</a>
                </h2>
              </header>
              <div class="post-body" itemprop="articleBody">
                <div class="thumb">
                  <img itemprop="contentUrl" class="random">
                </div>
                <div class="excerpt">
                  <p>
                  <p>PyExecJS 是一个可以模拟调用 JavaScript 脚本的 Python 库。</p>
                  <h2 id="相关链接"><a href="#相关链接" class="headerlink" title="相关链接"></a>相关链接</h2>
                  <ul>
                    <li>GitHub：<a href="https://github.com/doloopwhile/PyExecJS" target="_blank" rel="noopener">https://github.com/doloopwhile/PyExecJS</a></li>
                    <li>PyPi：<a href="https://pypi.org/project/PyExecJS/" target="_blank" rel="noopener">https://pypi.org/project/PyExecJS/</a></li>
                  </ul>
                  <h2 id="准备工作"><a href="#准备工作" class="headerlink" title="准备工作"></a>准备工作</h2>
                  <p>PyExecJS 需要 Node.js 执行环境，请先安装 Node.js，参考：<a href="https://setup.scrape.center/nodejs。" target="_blank" rel="noopener">https://setup.scrape.center/nodejs。</a></p>
                  <h2 id="安装方法"><a href="#安装方法" class="headerlink" title="安装方法"></a>安装方法</h2>
                  <h3 id="pip-安装"><a href="#pip-安装" class="headerlink" title="pip 安装"></a>pip 安装</h3>
                  <p>推荐使用 pip3 安装，命令如下：</p>
                  <figure class="highlight cmake">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">pip3 <span class="keyword">install</span> PyExecJS</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>命令执行完毕之后即可完成安装。</p>
                  <h2 id="验证安装"><a href="#验证安装" class="headerlink" title="验证安装"></a>验证安装</h2>
                  <p>安装完成之后，可以在 Python 命令行下测试。</p>
                  <figure class="highlight python">
                    <table>
                      <tr>
                        <td class="gutter">
                          <pre><span class="line">1</span><br><span class="line">2</span><br></pre>
                        </td>
                        <td class="code">
                          <pre><span class="line">$ python3</span><br><span class="line"><span class="meta">&gt;&gt;&gt; </span><span class="keyword">import</span> execjs</span><br></pre>
                        </td>
                      </tr>
                    </table>
                  </figure>
                  <p>如果没有错误报出，则证明库已经安装好了。</p>
                  </p>
                </div>
              </div>
              <div class="post-meta">
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-user"></i>
                  </span>
                  <span class="post-meta-item-text">作者</span>
                  <span><a href="/authors/崔庆才" class="author" itemprop="url" rel="index">崔庆才</a></span>
                </span>
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-calendar"></i>
                  </span>
                  <span class="post-meta-item-text">发表于</span>
                  <time title="创建时间：2021-10-04 02:44:45" itemprop="dateCreated datePublished" datetime="2021-10-04T02:44:45+08:00">2021-10-04</time>
                </span>
                <span id="/31092.html" class="post-meta-item leancloud_visitors" data-flag-title="PyExecJS 库的安装" title="阅读次数">
                  <span class="post-meta-item-icon">
                    <i class="fa fa-eye"></i>
                  </span>
                  <span class="post-meta-item-text">阅读次数：</span>
                  <span class="leancloud-visitors-count"></span>
                </span>
                <span class="post-meta-item" title="本文字数">
                  <span class="post-meta-item-icon">
                    <i class="far fa-file-word"></i>
                  </span>
                  <span class="post-meta-item-text">本文字数：</span>
                  <span>344</span>
                </span>
                <span class="post-meta-item" title="阅读时长">
                  <span class="post-meta-item-icon">
                    <i class="far fa-clock"></i>
                  </span>
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                  <span>1 分钟</span>
                </span>
              </div>
            </article>
            <script>
              document.querySelectorAll('.random').forEach(item => item.src = "https://picsum.photos/id/" + Math.floor(Math.random() * Math.floor(300)) + "/200/133")

            </script>
            <nav class="pagination">
              <span class="page-number current">1</span><a class="page-number" href="/page/2/">2</a><span class="space">&hellip;</span><a class="page-number" href="/page/31/">31</a><a class="extend next" rel="next" href="/page/2/"><i class="fa fa-angle-right" aria-label="下一页"></i></a>
            </nav>
          </div>
          <script>
            window.addEventListener('tabs:register', () =>
            {
              let
              {
                activeClass
              } = CONFIG.comments;
              if (CONFIG.comments.storage)
              {
                activeClass = localStorage.getItem('comments_active') || activeClass;
              }
              if (activeClass)
              {
                let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
                if (activeTab)
                {
                  activeTab.click();
                }
              }
            });
            if (CONFIG.comments.storage)
            {
              window.addEventListener('tabs:click', event =>
              {
                if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
                let commentClass = event.target.classList[1];
                localStorage.setItem('comments_active', commentClass);
              });
            }

          </script>
        </div>
        <div class="toggle sidebar-toggle">
          <span class="toggle-line toggle-line-first"></span>
          <span class="toggle-line toggle-line-middle"></span>
          <span class="toggle-line toggle-line-last"></span>
        </div>
        <aside class="sidebar">
          <div class="sidebar-inner">
            <ul class="sidebar-nav motion-element">
              <li class="sidebar-nav-toc"> 文章目录 </li>
              <li class="sidebar-nav-overview"> 站点概览 </li>
            </ul>
            <!--noindex-->
            <div class="post-toc-wrap sidebar-panel">
            </div>
            <!--/noindex-->
            <div class="site-overview-wrap sidebar-panel">
              <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
                <img class="site-author-image" itemprop="image" alt="崔庆才" src="/images/avatar.png">
                <p class="site-author-name" itemprop="name">崔庆才</p>
                <div class="site-description" itemprop="description">崔庆才的个人站点，记录生活的瞬间，分享学习的心得。</div>
              </div>
              <div class="site-state-wrap motion-element">
                <nav class="site-state">
                  <div class="site-state-item site-state-posts">
                    <a href="/archives/">
                      <span class="site-state-item-count">608</span>
                      <span class="site-state-item-name">日志</span>
                    </a>
                  </div>
                  <div class="site-state-item site-state-categories">
                    <a href="/categories/">
                      <span class="site-state-item-count">24</span>
                      <span class="site-state-item-name">分类</span></a>
                  </div>
                  <div class="site-state-item site-state-tags">
                    <a href="/tags/">
                      <span class="site-state-item-count">156</span>
                      <span class="site-state-item-name">标签</span></a>
                  </div>
                </nav>
              </div>
              <div class="links-of-author motion-element">
                <span class="links-of-author-item">
                  <a href="https://github.com/Germey" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;Germey" rel="noopener" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
                </span>
                <span class="links-of-author-item">
                  <a href="mailto:cqc@cuiqingcai.com.com" title="邮件 → mailto:cqc@cuiqingcai.com.com" rel="noopener" target="_blank"><i class="fa fa-envelope fa-fw"></i>邮件</a>
                </span>
                <span class="links-of-author-item">
                  <a href="https://weibo.com/cuiqingcai" title="微博 → https:&#x2F;&#x2F;weibo.com&#x2F;cuiqingcai" rel="noopener" target="_blank"><i class="fab fa-weibo fa-fw"></i>微博</a>
                </span>
                <span class="links-of-author-item">
                  <a href="https://www.zhihu.com/people/Germey" title="知乎 → https:&#x2F;&#x2F;www.zhihu.com&#x2F;people&#x2F;Germey" rel="noopener" target="_blank"><i class="fa fa-magic fa-fw"></i>知乎</a>
                </span>
              </div>
            </div>
            <div style=" width: 100%;" class="sidebar-panel sidebar-panel-image sidebar-panel-active">
              <a href="https://tutorial.lengyue.video/?coupon=12ef4b1a-a3db-11ea-bb37-0242ac130002_cqx_850" target="_blank" rel="noopener">
                <img src="https://qiniu.cuiqingcai.com/bco2a.png" style=" width: 100%;">
              </a>
            </div>
            <div style=" width: 100%;" class="sidebar-panel sidebar-panel-image sidebar-panel-active">
              <a href="http://www.ipidea.net/?utm-source=cqc&utm-keyword=?cqc" target="_blank" rel="noopener">
                <img src="https://qiniu.cuiqingcai.com/0ywun.png" style=" width: 100%;">
              </a>
            </div>
            <div class="sidebar-panel sidebar-panel-tags sidebar-panel-active">
              <h4 class="name"> 标签云 </h4>
              <div class="content">
                <a href="/tags/2048/" style="font-size: 10px;">2048</a> <a href="/tags/API/" style="font-size: 10px;">API</a> <a href="/tags/Bootstrap/" style="font-size: 11.25px;">Bootstrap</a> <a href="/tags/CDN/" style="font-size: 10px;">CDN</a> <a href="/tags/CQC/" style="font-size: 10px;">CQC</a> <a href="/tags/CSS/" style="font-size: 10px;">CSS</a> <a href="/tags/CSS-%E5%8F%8D%E7%88%AC%E8%99%AB/" style="font-size: 10px;">CSS 反爬虫</a> <a href="/tags/CV/" style="font-size: 10px;">CV</a> <a href="/tags/Django/" style="font-size: 10px;">Django</a> <a href="/tags/Eclipse/" style="font-size: 11.25px;">Eclipse</a> <a href="/tags/FTP/" style="font-size: 10px;">FTP</a> <a href="/tags/Git/" style="font-size: 10px;">Git</a> <a href="/tags/GitHub/" style="font-size: 13.75px;">GitHub</a> <a href="/tags/HTML5/" style="font-size: 10px;">HTML5</a> <a href="/tags/Hexo/" style="font-size: 10px;">Hexo</a> <a href="/tags/IT/" style="font-size: 10px;">IT</a> <a href="/tags/JSP/" style="font-size: 10px;">JSP</a> <a href="/tags/JavaScript/" style="font-size: 10px;">JavaScript</a> <a href="/tags/K8s/" style="font-size: 10px;">K8s</a> <a href="/tags/LOGO/" style="font-size: 10px;">LOGO</a> <a href="/tags/Linux/" style="font-size: 10px;">Linux</a> <a href="/tags/MIUI/" style="font-size: 10px;">MIUI</a> <a href="/tags/MongoDB/" style="font-size: 10px;">MongoDB</a> <a href="/tags/Mysql/" style="font-size: 10px;">Mysql</a> <a href="/tags/NBA/" style="font-size: 10px;">NBA</a> <a href="/tags/PHP/" style="font-size: 11.25px;">PHP</a> <a href="/tags/PS/" style="font-size: 10px;">PS</a> <a href="/tags/Pathlib/" style="font-size: 10px;">Pathlib</a> <a href="/tags/PhantomJS/" style="font-size: 10px;">PhantomJS</a> <a href="/tags/Python/" style="font-size: 15px;">Python</a> <a href="/tags/Python3/" style="font-size: 12.5px;">Python3</a> <a href="/tags/Pythonic/" style="font-size: 10px;">Pythonic</a> <a href="/tags/QQ/" style="font-size: 10px;">QQ</a> <a href="/tags/Redis/" style="font-size: 10px;">Redis</a> <a href="/tags/SAE/" style="font-size: 10px;">SAE</a> <a href="/tags/SSH/" style="font-size: 10px;">SSH</a> <a href="/tags/SVG/" style="font-size: 10px;">SVG</a> <a href="/tags/Scrapy/" style="font-size: 10px;">Scrapy</a> <a href="/tags/Scrapy-redis/" style="font-size: 10px;">Scrapy-redis</a> <a href="/tags/Scrapy%E5%88%86%E5%B8%83%E5%BC%8F/" style="font-size: 10px;">Scrapy分布式</a> <a href="/tags/Selenium/" style="font-size: 10px;">Selenium</a> <a href="/tags/TKE/" style="font-size: 10px;">TKE</a> <a href="/tags/Ubuntu/" style="font-size: 11.25px;">Ubuntu</a> <a href="/tags/VS-Code/" style="font-size: 10px;">VS Code</a> <a href="/tags/Vs-Code/" style="font-size: 10px;">Vs Code</a> <a href="/tags/Vue/" style="font-size: 11.25px;">Vue</a> <a href="/tags/Webpack/" style="font-size: 10px;">Webpack</a> <a href="/tags/Windows/" style="font-size: 10px;">Windows</a> <a href="/tags/Winpcap/" style="font-size: 10px;">Winpcap</a> <a href="/tags/WordPress/" style="font-size: 13.75px;">WordPress</a> <a href="/tags/Youtube/" style="font-size: 11.25px;">Youtube</a> <a href="/tags/android/" style="font-size: 10px;">android</a> <a href="/tags/ansible/" style="font-size: 10px;">ansible</a> <a href="/tags/cocos2d-x/" style="font-size: 10px;">cocos2d-x</a> <a href="/tags/e6/" style="font-size: 10px;">e6</a> <a href="/tags/fitvids/" style="font-size: 10px;">fitvids</a> <a href="/tags/git/" style="font-size: 11.25px;">git</a> <a href="/tags/json/" style="font-size: 10px;">json</a> <a href="/tags/js%E9%80%86%E5%90%91/" style="font-size: 10px;">js逆向</a> <a href="/tags/kubernetes/" style="font-size: 10px;">kubernetes</a> <a href="/tags/log/" style="font-size: 10px;">log</a> <a href="/tags/logging/" style="font-size: 10px;">logging</a> <a href="/tags/matlab/" style="font-size: 11.25px;">matlab</a> <a href="/tags/python/" style="font-size: 20px;">python</a> <a href="/tags/pytube/" style="font-size: 11.25px;">pytube</a> <a href="/tags/pywin32/" style="font-size: 10px;">pywin32</a> <a href="/tags/style/" style="font-size: 10px;">style</a> <a href="/tags/tomcat/" style="font-size: 10px;">tomcat</a> <a href="/tags/ubuntu/" style="font-size: 10px;">ubuntu</a> <a href="/tags/uwsgi/" style="font-size: 10px;">uwsgi</a> <a href="/tags/vsftpd/" style="font-size: 10px;">vsftpd</a> <a href="/tags/wamp/" style="font-size: 10px;">wamp</a> <a href="/tags/wineQQ/" style="font-size: 10px;">wineQQ</a> <a href="/tags/%E4%B8%83%E7%89%9B/" style="font-size: 11.25px;">七牛</a> <a href="/tags/%E4%B8%8A%E6%B5%B7/" style="font-size: 10px;">上海</a> <a href="/tags/%E4%B8%AA%E4%BA%BA%E7%BD%91%E7%AB%99/" style="font-size: 10px;">个人网站</a> <a href="/tags/%E4%B8%BB%E9%A2%98/" style="font-size: 10px;">主题</a> <a href="/tags/%E4%BA%91%E4%BA%A7%E5%93%81/" style="font-size: 10px;">云产品</a> <a href="/tags/%E4%BA%91%E5%AD%98%E5%82%A8/" style="font-size: 10px;">云存储</a> <a href="/tags/%E4%BA%AC%E4%B8%9C%E4%BA%91/" style="font-size: 10px;">京东云</a> <a href="/tags/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD/" style="font-size: 12.5px;">人工智能</a> <a href="/tags/%E4%BB%A3%E7%90%86/" style="font-size: 10px;">代理</a> <a href="/tags/%E4%BB%A3%E7%A0%81/" style="font-size: 10px;">代码</a> <a href="/tags/%E4%BB%A3%E7%A0%81%E5%88%86%E4%BA%AB%E5%9B%BE/" style="font-size: 10px;">代码分享图</a> <a href="/tags/%E4%BC%98%E5%8C%96/" style="font-size: 10px;">优化</a> <a href="/tags/%E4%BD%8D%E8%BF%90%E7%AE%97/" style="font-size: 10px;">位运算</a> <a href="/tags/%E5%85%AC%E4%BC%97%E5%8F%B7/" style="font-size: 10px;">公众号</a> <a href="/tags/%E5%88%86%E4%BA%AB/" style="font-size: 10px;">分享</a> <a href="/tags/%E5%88%86%E5%B8%83%E5%BC%8F/" style="font-size: 10px;">分布式</a> <a href="/tags/%E5%88%9B%E4%B8%9A/" style="font-size: 10px;">创业</a> <a href="/tags/%E5%89%8D%E7%AB%AF/" style="font-size: 12.5px;">前端</a> <a href="/tags/%E5%8D%9A%E5%AE%A2/" style="font-size: 10px;">博客</a> <a href="/tags/%E5%8E%9F%E7%94%9FAPP/" style="font-size: 10px;">原生APP</a> <a href="/tags/%E5%8F%8D%E7%88%AC%E8%99%AB/" style="font-size: 12.5px;">反爬虫</a> <a href="/tags/%E5%91%BD%E4%BB%A4/" style="font-size: 10px;">命令</a> <a href="/tags/%E5%93%8D%E5%BA%94%E5%BC%8F%E5%B8%83%E5%B1%80/" style="font-size: 10px;">响应式布局</a> <a href="/tags/%E5%9E%83%E5%9C%BE%E9%82%AE%E4%BB%B6/" style="font-size: 10px;">垃圾邮件</a> <a href="/tags/%E5%9F%9F%E5%90%8D%E7%BB%91%E5%AE%9A/" style="font-size: 10px;">域名绑定</a> <a href="/tags/%E5%A4%8D%E7%9B%98/" style="font-size: 10px;">复盘</a> <a href="/tags/%E5%A4%A7%E4%BC%97%E7%82%B9%E8%AF%84/" style="font-size: 10px;">大众点评</a> <a href="/tags/%E5%AD%97%E4%BD%93%E5%8F%8D%E7%88%AC%E8%99%AB/" style="font-size: 10px;">字体反爬虫</a> <a href="/tags/%E5%AD%97%E7%AC%A6%E9%97%AE%E9%A2%98/" style="font-size: 10px;">字符问题</a> <a href="/tags/%E5%AD%A6%E4%B9%A0%E6%96%B9%E6%B3%95/" style="font-size: 10px;">学习方法</a> <a href="/tags/%E5%AE%89%E5%8D%93/" style="font-size: 10px;">安卓</a> <a href="/tags/%E5%AE%9E%E7%94%A8/" style="font-size: 10px;">实用</a> <a href="/tags/%E5%B0%81%E9%9D%A2/" style="font-size: 10px;">封面</a> <a href="/tags/%E5%B4%94%E5%BA%86%E6%89%8D/" style="font-size: 18.75px;">崔庆才</a> <a href="/tags/%E5%B7%A5%E5%85%B7/" style="font-size: 12.5px;">工具</a> <a href="/tags/%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7/" style="font-size: 10px;">开发工具</a> <a href="/tags/%E5%BE%AE%E8%BD%AF/" style="font-size: 10px;">微软</a> <a href="/tags/%E6%80%9D%E8%80%83/" style="font-size: 10px;">思考</a> <a href="/tags/%E6%89%8B%E6%9C%BA%E8%AE%BF%E9%97%AE/" style="font-size: 10px;">手机访问</a> <a href="/tags/%E6%95%99%E7%A8%8B/" style="font-size: 10px;">教程</a> <a href="/tags/%E6%95%99%E8%82%B2/" style="font-size: 10px;">教育</a> <a href="/tags/%E6%96%B0%E4%B9%A6/" style="font-size: 12.5px;">新书</a> <a href="/tags/%E6%96%B9%E6%B3%95%E8%AE%BA/" style="font-size: 10px;">方法论</a> <a href="/tags/%E6%97%85%E6%B8%B8/" style="font-size: 10px;">旅游</a> <a href="/tags/%E6%97%A5%E5%BF%97/" style="font-size: 10px;">日志</a> <a href="/tags/%E6%9A%97%E6%97%B6%E9%97%B4/" style="font-size: 10px;">暗时间</a> <a href="/tags/%E6%9D%9C%E5%85%B0%E7%89%B9/" style="font-size: 11.25px;">杜兰特</a> <a href="/tags/%E6%A1%8C%E9%9D%A2/" style="font-size: 10px;">桌面</a> <a href="/tags/%E6%AD%8C%E5%8D%95/" style="font-size: 10px;">歌单</a> <a href="/tags/%E6%B1%9F%E5%8D%97/" style="font-size: 10px;">江南</a> <a href="/tags/%E6%B8%B8%E6%88%8F/" style="font-size: 10px;">游戏</a> <a href="/tags/%E7%84%A6%E8%99%91/" style="font-size: 10px;">焦虑</a> <a href="/tags/%E7%88%AC%E8%99%AB/" style="font-size: 16.25px;">爬虫</a> <a href="/tags/%E7%88%AC%E8%99%AB%E4%B9%A6%E7%B1%8D/" style="font-size: 11.25px;">爬虫书籍</a> <a href="/tags/%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F/" style="font-size: 10px;">环境变量</a> <a href="/tags/%E7%94%9F%E6%B4%BB%E7%AC%94%E8%AE%B0/" style="font-size: 10px;">生活笔记</a> <a href="/tags/%E7%99%BB%E5%BD%95/" style="font-size: 10px;">登录</a> <a href="/tags/%E7%9F%A5%E4%B9%8E/" style="font-size: 10px;">知乎</a> <a href="/tags/%E7%9F%AD%E4%BF%A1/" style="font-size: 10px;">短信</a> <a href="/tags/%E7%9F%AD%E4%BF%A1%E9%AA%8C%E8%AF%81%E7%A0%81/" style="font-size: 10px;">短信验证码</a> <a href="/tags/%E7%AC%94%E8%AE%B0%E8%BD%AF%E4%BB%B6/" style="font-size: 10px;">笔记软件</a> <a href="/tags/%E7%AF%AE%E7%BD%91/" style="font-size: 10px;">篮网</a> <a href="/tags/%E7%BA%B8%E5%BC%A0/" style="font-size: 10px;">纸张</a> <a href="/tags/%E7%BB%84%E4%BB%B6/" style="font-size: 10px;">组件</a> <a href="/tags/%E7%BD%91%E7%AB%99/" style="font-size: 10px;">网站</a> <a href="/tags/%E7%BD%91%E7%BB%9C%E7%88%AC%E8%99%AB/" style="font-size: 11.25px;">网络爬虫</a> <a href="/tags/%E7%BE%8E%E5%AD%A6/" style="font-size: 10px;">美学</a> <a href="/tags/%E8%82%89%E5%A4%B9%E9%A6%8D/" style="font-size: 10px;">肉夹馍</a> <a href="/tags/%E8%85%BE%E8%AE%AF%E4%BA%91/" style="font-size: 10px;">腾讯云</a> <a href="/tags/%E8%87%AA%E5%BE%8B/" style="font-size: 10px;">自律</a> <a href="/tags/%E8%A5%BF%E5%B0%91%E7%88%B7/" style="font-size: 10px;">西少爷</a> <a href="/tags/%E8%A7%86%E9%A2%91/" style="font-size: 10px;">视频</a> <a href="/tags/%E8%B0%B7%E6%AD%8C%E9%AA%8C%E8%AF%81%E7%A0%81/" style="font-size: 10px;">谷歌验证码</a> <a href="/tags/%E8%BF%90%E8%90%A5/" style="font-size: 10px;">运营</a> <a href="/tags/%E8%BF%9C%E7%A8%8B/" style="font-size: 10px;">远程</a> <a href="/tags/%E9%80%86%E5%90%91/" style="font-size: 10px;">逆向</a> <a href="/tags/%E9%85%8D%E7%BD%AE/" style="font-size: 10px;">配置</a> <a href="/tags/%E9%87%8D%E8%A3%85/" style="font-size: 10px;">重装</a> <a href="/tags/%E9%98%BF%E6%9D%9C/" style="font-size: 10px;">阿杜</a> <a href="/tags/%E9%9D%99%E8%A7%85/" style="font-size: 17.5px;">静觅</a> <a href="/tags/%E9%A2%A0%E8%A6%86/" style="font-size: 10px;">颠覆</a> <a href="/tags/%E9%A3%9E%E4%BF%A1/" style="font-size: 10px;">飞信</a> <a href="/tags/%E9%B8%BF%E8%92%99/" style="font-size: 10px;">鸿蒙</a>
              </div>
              <script>
                const tagsColors = ['#00a67c', '#5cb85c', '#d9534f', '#567e95', '#b37333', '#f4843d', '#15a287']
                const tagsElements = document.querySelectorAll('.sidebar-panel-tags .content a')
                tagsElements.forEach((item) =>
                {
                  item.style.backgroundColor = tagsColors[Math.floor(Math.random() * tagsColors.length)]
                })

              </script>
            </div>
            <div class="sidebar-panel sidebar-panel-categories sidebar-panel-active">
              <h4 class="name"> 分类 </h4>
              <div class="content">
                <ul class="category-list">
                  <li class="category-list-item"><a class="category-list-link" href="/categories/C-C/">C/C++</a><span class="category-list-count">23</span></li>
                  <li class="category-list-item"><a class="category-list-link" href="/categories/HTML/">HTML</a><span class="category-list-count">14</span></li>
                  <li class="category-list-item"><a class="category-list-link" href="/categories/Java/">Java</a><span class="category-list-count">5</span></li>
                  <li class="category-list-item"><a class="category-list-link" href="/categories/JavaScript/">JavaScript</a><span class="category-list-count">26</span></li>
                  <li class="category-list-item"><a class="category-list-link" href="/categories/Linux/">Linux</a><span class="category-list-count">15</span></li>
                  <li class="category-list-item"><a class="category-list-link" href="/categories/Markdown/">Markdown</a><span class="category-list-count">1</span></li>
                  <li class="category-list-item"><a class="category-list-link" href="/categories/Net/">Net</a><span class="category-list-count">4</span></li>
                  <li class="category-list-item"><a class="category-list-link" href="/categories/Other/">Other</a><span class="category-list-count">39</span></li>
                  <li class="category-list-item"><a class="category-list-link" href="/categories/PHP/">PHP</a><span class="category-list-count">27</span></li>
                  <li class="category-list-item"><a class="category-list-link" href="/categories/Paper/">Paper</a><span class="category-list-count">2</span></li>
                  <li class="category-list-item"><a class="category-list-link" href="/categories/Python/">Python</a><span class="category-list-count">261</span></li>
                  <li class="category-list-item"><a class="category-list-link" href="/categories/TypeScript/">TypeScript</a><span class="category-list-count">2</span></li>
                  <li class="category-list-item"><a class="category-list-link" href="/categories/%E4%B8%AA%E4%BA%BA%E5%B1%95%E7%A4%BA/">个人展示</a><span class="category-list-count">1</span></li>
                  <li class="category-list-item"><a class="category-list-link" href="/categories/%E4%B8%AA%E4%BA%BA%E6%97%A5%E8%AE%B0/">个人日记</a><span class="category-list-count">9</span></li>
                  <li class="category-list-item"><a class="category-list-link" href="/categories/%E4%B8%AA%E4%BA%BA%E8%AE%B0%E5%BD%95/">个人记录</a><span class="category-list-count">4</span></li>
                  <li class="category-list-item"><a class="category-list-link" href="/categories/%E4%B8%AA%E4%BA%BA%E9%9A%8F%E7%AC%94/">个人随笔</a><span class="category-list-count">15</span></li>
                  <li class="category-list-item"><a class="category-list-link" href="/categories/%E5%AE%89%E8%A3%85%E9%85%8D%E7%BD%AE/">安装配置</a><span class="category-list-count">59</span></li>
                  <li class="category-list-item"><a class="category-list-link" href="/categories/%E6%8A%80%E6%9C%AF%E6%9D%82%E8%B0%88/">技术杂谈</a><span class="category-list-count">88</span></li>
                  <li class="category-list-item"><a class="category-list-link" href="/categories/%E6%9C%AA%E5%88%86%E7%B1%BB/">未分类</a><span class="category-list-count">1</span></li>
                  <li class="category-list-item"><a class="category-list-link" href="/categories/%E7%94%9F%E6%B4%BB%E7%AC%94%E8%AE%B0/">生活笔记</a><span class="category-list-count">1</span></li>
                  <li class="category-list-item"><a class="category-list-link" href="/categories/%E7%A6%8F%E5%88%A9%E4%B8%93%E5%8C%BA/">福利专区</a><span class="category-list-count">6</span></li>
                  <li class="category-list-item"><a class="category-list-link" href="/categories/%E8%81%8C%E4%BD%8D%E6%8E%A8%E8%8D%90/">职位推荐</a><span class="category-list-count">2</span></li>
                </ul>
              </div>
            </div>
            <div class="sidebar-panel sidebar-panel-friends sidebar-panel-active">
              <h4 class="name"> 友情链接 </h4>
              <ul class="friends">
                <li class="friend">
                  <span class="logo">
                    <img src="https://qiniu.cuiqingcai.com/j2dub.jpg">
                  </span>
                  <span class="link">
                    <a href="https://www.findhao.net/" target="_blank" rel="noopener">FindHao</a>
                  </span>
                </li>
                <li class="friend">
                  <span class="logo">
                    <img src="https://qiniu.cuiqingcai.com/ou6mm.jpg">
                  </span>
                  <span class="link">
                    <a href="https://diygod.me/" target="_blank" rel="noopener">DIYgod</a>
                  </span>
                </li>
                <li class="friend">
                  <span class="logo">
                    <img src="https://qiniu.cuiqingcai.com/6apxu.jpg">
                  </span>
                  <span class="link">
                    <a href="https://www.51dev.com/" target="_blank" rel="noopener">IT技术社区</a>
                  </span>
                </li>
                <li class="friend">
                  <span class="logo">
                    <img src="https://www.jankl.com/img/titleshu.jpg">
                  </span>
                  <span class="link">
                    <a href="https://www.jankl.com/" target="_blank" rel="noopener">liberalist</a>
                  </span>
                </li>
                <li class="friend">
                  <span class="logo">
                    <img src="https://qiniu.cuiqingcai.com/bqlbs.png">
                  </span>
                  <span class="link">
                    <a href="http://www.urselect.com/" target="_blank" rel="noopener">优社电商</a>
                  </span>
                </li>
                <li class="friend">
                  <span class="logo">
                    <img src="https://qiniu.cuiqingcai.com/8s88c.jpg">
                  </span>
                  <span class="link">
                    <a href="https://www.yuanrenxue.com/" target="_blank" rel="noopener">猿人学</a>
                  </span>
                </li>
                <li class="friend">
                  <span class="logo">
                    <img src="https://qiniu.cuiqingcai.com/2wgg5.jpg">
                  </span>
                  <span class="link">
                    <a href="https://www.yunlifang.cn/" target="_blank" rel="noopener">云立方</a>
                  </span>
                </li>
                <li class="friend">
                  <span class="logo">
                    <img src="https://qiniu.cuiqingcai.com/shwr6.png">
                  </span>
                  <span class="link">
                    <a href="http://lanbing510.info/" target="_blank" rel="noopener">冰蓝</a>
                  </span>
                </li>
                <li class="friend">
                  <span class="logo">
                    <img src="https://qiniu.cuiqingcai.com/blvoh.jpg">
                  </span>
                  <span class="link">
                    <a href="https://lengyue.me/" target="_blank" rel="noopener">冷月</a>
                  </span>
                </li>
                <li class="friend">
                  <span class="logo">
                    <img src="http://qianxunclub.com/favicon.png">
                  </span>
                  <span class="link">
                    <a href="http://qianxunclub.com/" target="_blank" rel="noopener">千寻啊千寻</a>
                  </span>
                </li>
                <li class="friend">
                  <span class="logo">
                    <img src="https://qiniu.cuiqingcai.com/0044u.jpg">
                  </span>
                  <span class="link">
                    <a href="http://kodcloud.com/" target="_blank" rel="noopener">可道云</a>
                  </span>
                </li>
                <li class="friend">
                  <span class="logo">
                    <img src="https://qiniu.cuiqingcai.com/ygnpn.jpg">
                  </span>
                  <span class="link">
                    <a href="http://www.kunkundashen.cn/" target="_blank" rel="noopener">坤坤大神</a>
                  </span>
                </li>
                <li class="friend">
                  <span class="logo">
                    <img src="https://qiniu.cuiqingcai.com/22uv1.png">
                  </span>
                  <span class="link">
                    <a href="http://www.cenchong.com/" target="_blank" rel="noopener">岑冲博客</a>
                  </span>
                </li>
                <li class="friend">
                  <span class="logo">
                    <img src="https://qiniu.cuiqingcai.com/ev9kl.png">
                  </span>
                  <span class="link">
                    <a href="http://www.zxiaoji.com/" target="_blank" rel="noopener">张小鸡</a>
                  </span>
                </li>
                <li class="friend">
                  <span class="logo">
                    <img src="https://www.503error.com/favicon.ico">
                  </span>
                  <span class="link">
                    <a href="https://www.503error.com/" target="_blank" rel="noopener">张志明个人博客</a>
                  </span>
                </li>
                <li class="friend">
                  <span class="logo">
                    <img src="https://qiniu.cuiqingcai.com/x714o.jpg">
                  </span>
                  <span class="link">
                    <a href="http://www.hubwiz.com/" target="_blank" rel="noopener">汇智网</a>
                  </span>
                </li>
                <li class="friend">
                  <span class="logo">
                    <img src="https://qiniu.cuiqingcai.com/129d8.png">
                  </span>
                  <span class="link">
                    <a href="https://www.bysocket.com/" target="_blank" rel="noopener">泥瓦匠BYSocket</a>
                  </span>
                </li>
                <li class="friend">
                  <span class="logo">
                    <img src="https://www.xiongge.club/favicon.ico">
                  </span>
                  <span class="link">
                    <a href="https://www.xiongge.club/" target="_blank" rel="noopener">熊哥club</a>
                  </span>
                </li>
                <li class="friend">
                  <span class="logo">
                    <img src="https://qiniu.cuiqingcai.com/3w4fe.png">
                  </span>
                  <span class="link">
                    <a href="https://zerlong.com/" target="_blank" rel="noopener">知语</a>
                  </span>
                </li>
                <li class="friend">
                  <span class="logo">
                    <img src="https://qiniu.cuiqingcai.com/44hxf.png">
                  </span>
                  <span class="link">
                    <a href="http://redstonewill.com/" target="_blank" rel="noopener">红色石头</a>
                  </span>
                </li>
                <li class="friend">
                  <span class="logo">
                    <img src="https://qiniu.cuiqingcai.com/8g1fk.jpg">
                  </span>
                  <span class="link">
                    <a href="http://www.laodong.me/" target="_blank" rel="noopener">老董博客</a>
                  </span>
                </li>
                <li class="friend">
                  <span class="logo">
                    <img src="https://qiniu.cuiqingcai.com/wkaus.jpg">
                  </span>
                  <span class="link">
                    <a href="https://zhaoshuai.me/" target="_blank" rel="noopener">碎念</a>
                  </span>
                </li>
                <li class="friend">
                  <span class="logo">
                    <img src="https://qiniu.cuiqingcai.com/pgo0r.jpg">
                  </span>
                  <span class="link">
                    <a href="https://www.chenwenguan.com/" target="_blank" rel="noopener">陈文管的博客</a>
                  </span>
                </li>
                <li class="friend">
                  <span class="logo">
                    <img src="https://qiniu.cuiqingcai.com/kk82a.jpg">
                  </span>
                  <span class="link">
                    <a href="https://www.lxlinux.net/" target="_blank" rel="noopener">良许Linux教程网</a>
                  </span>
                </li>
                <li class="friend">
                  <span class="logo">
                    <img src="https://qiniu.cuiqingcai.com/lj0t2.jpg">
                  </span>
                  <span class="link">
                    <a href="https://tanqingbo.cn/" target="_blank" rel="noopener">IT码农</a>
                  </span>
                </li>
                <li class="friend">
                  <span class="logo">
                    <img src="https://qiniu.cuiqingcai.com/i8cdr.png">
                  </span>
                  <span class="link">
                    <a href="https://junyiseo.com/" target="_blank" rel="noopener">均益个人博客</a>
                  </span>
                </li>
                <li class="friend">
                  <span class="logo">
                    <img src="https://qiniu.cuiqingcai.com/chwv2.png">
                  </span>
                  <span class="link">
                    <a href="https://brucedone.com/" target="_blank" rel="noopener">大鱼的鱼塘</a>
                  </span>
                </li>
                <li class="friend">
                  <span class="logo">
                    <img src="https://qiniu.cuiqingcai.com/2y43o.png">
                  </span>
                  <span class="link">
                    <a href="http://bbs.nightteam.cn/" target="_blank" rel="noopener">夜幕爬虫安全论坛</a>
                  </span>
                </li>
                <li class="friend">
                  <span class="logo">
                    <img src="https://qiniu.cuiqingcai.com/zvc3w.jpg">
                  </span>
                  <span class="link">
                    <a href="https://www.weishidong.com/" target="_blank" rel="noopener">韦世东的技术专栏</a>
                  </span>
                </li>
                <li class="friend">
                  <span class="logo">
                    <img src="https://qiniu.cuiqingcai.com/ebudy.jpg">
                  </span>
                  <span class="link">
                    <a href="https://chuanjiabing.com/" target="_blank" rel="noopener">穿甲兵技术社区</a>
                  </span>
                </li>
              </ul>
            </div>
          </div>
        </aside>
        <div id="sidebar-dimmer"></div>
      </div>
    </main>
    <footer class="footer">
      <div class="footer-inner">
        <div class="copyright"> &copy; <span itemprop="copyrightYear">2021</span>
          <span class="with-love">
            <i class="fa fa-heart"></i>
          </span>
          <span class="author" itemprop="copyrightHolder">崔庆才丨静觅</span>
          <span class="post-meta-divider">|</span>
          <span class="post-meta-item-icon">
            <i class="fa fa-chart-area"></i>
          </span>
          <span title="站点总字数">2.6m</span>
          <span class="post-meta-divider">|</span>
          <span class="post-meta-item-icon">
            <i class="fa fa-coffee"></i>
          </span>
          <span title="站点阅读时长">39:54</span>
        </div>
        <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://pisces.theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Pisces</a> 强力驱动 </div>
        <div class="beian"><a href="https://beian.miit.gov.cn/" rel="noopener" target="_blank">京ICP备18015597号-1 </a>
        </div>
        <script>
          (function ()
          {
            function leancloudSelector(url)
            {
              url = encodeURI(url);
              return document.getElementById(url).querySelector('.leancloud-visitors-count');
            }

            function addCount(Counter)
            {
              var visitors = document.querySelector('.leancloud_visitors');
              var url = decodeURI(visitors.id);
              var title = visitors.dataset.flagTitle;
              Counter('get', '/classes/Counter?where=' + encodeURIComponent(JSON.stringify(
              {
                url
              }))).then(response => response.json()).then((
              {
                results
              }) =>
              {
                if (results.length > 0)
                {
                  var counter = results[0];
                  leancloudSelector(url).innerText = counter.time + 1;
                  Counter('put', '/classes/Counter/' + counter.objectId,
                  {
                    time:
                    {
                      '__op': 'Increment',
                      'amount': 1
                    }
                  }).catch(error =>
                  {
                    console.error('Failed to save visitor count', error);
                  });
                }
                else
                {
                  Counter('post', '/classes/Counter',
                  {
                    title,
                    url,
                    time: 1
                  }).then(response => response.json()).then(() =>
                  {
                    leancloudSelector(url).innerText = 1;
                  }).catch(error =>
                  {
                    console.error('Failed to create', error);
                  });
                }
              }).catch(error =>
              {
                console.error('LeanCloud Counter Error', error);
              });
            }

            function showTime(Counter)
            {
              var visitors = document.querySelectorAll('.leancloud_visitors');
              var entries = [...visitors].map(element =>
              {
                return decodeURI(element.id);
              });
              Counter('get', '/classes/Counter?where=' + encodeURIComponent(JSON.stringify(
              {
                url:
                {
                  '$in': entries
                }
              }))).then(response => response.json()).then((
              {
                results
              }) =>
              {
                for (let url of entries)
                {
                  let target = results.find(item => item.url === url);
                  leancloudSelector(url).innerText = target ? target.time : 0;
                }
              }).catch(error =>
              {
                console.error('LeanCloud Counter Error', error);
              });
            }
            let
            {
              app_id,
              app_key,
              server_url
            } = {
              "enable": true,
              "app_id": "6X5dRQ0pnPWJgYy8SXOg0uID-gzGzoHsz",
              "app_key": "ziLDVEy73ne5HtFTiGstzHMS",
              "server_url": "https://6x5drq0p.lc-cn-n1-shared.com",
              "security": false
            };

            function fetchData(api_server)
            {
              var Counter = (method, url, data) =>
              {
                return fetch(`${api_server}/1.1${url}`,
                {
                  method,
                  headers:
                  {
                    'X-LC-Id': app_id,
                    'X-LC-Key': app_key,
                    'Content-Type': 'application/json',
                  },
                  body: JSON.stringify(data)
                });
              };
              if (CONFIG.page.isPost)
              {
                if (CONFIG.hostname !== location.hostname) return;
                addCount(Counter);
              }
              else if (document.querySelectorAll('.post-title-link').length >= 1)
              {
                showTime(Counter);
              }
            }
            let api_server = app_id.slice(-9) !== '-MdYXbMMI' ? server_url : `https://${app_id.slice(0, 8).toLowerCase()}.api.lncldglobal.com`;
            if (api_server)
            {
              fetchData(api_server);
            }
            else
            {
              fetch('https://app-router.leancloud.cn/2/route?appId=' + app_id).then(response => response.json()).then((
              {
                api_server
              }) =>
              {
                fetchData('https://' + api_server);
              });
            }
          })();

        </script>
      </div>
      <div class="footer-stat">
        <span id="cnzz_stat_icon_1279355174"></span>
        <script type="text/javascript">
          document.write(unescape("%3Cspan id='cnzz_stat_icon_1279355174'%3E%3C/span%3E%3Cscript src='https://v1.cnzz.com/z_stat.php%3Fid%3D1279355174%26online%3D1%26show%3Dline' type='text/javascript'%3E%3C/script%3E"));

        </script>
      </div>
    </footer>
  </div>
  <script src="//cdn.jsdelivr.net/npm/animejs@3.2.1/lib/anime.min.js"></script>
  <script src="//cdn.jsdelivr.net/npm/pangu@4/dist/browser/pangu.min.js"></script>
  <script src="/js/utils.js"></script>
  <script src="/.js"></script>
  <script src="/js/schemes/pisces.js"></script>
  <script src="/.js"></script>
  <script src="/js/next-boot.js"></script>
  <script src="/.js"></script>
  <script>
    (function ()
    {
      var canonicalURL, curProtocol;
      //Get the <link> tag
      var x = document.getElementsByTagName("link");
      //Find the last canonical URL
      if (x.length > 0)
      {
        for (i = 0; i < x.length; i++)
        {
          if (x[i].rel.toLowerCase() == 'canonical' && x[i].href)
          {
            canonicalURL = x[i].href;
          }
        }
      }
      //Get protocol
      if (!canonicalURL)
      {
        curProtocol = window.location.protocol.split(':')[0];
      }
      else
      {
        curProtocol = canonicalURL.split(':')[0];
      }
      //Get current URL if the canonical URL does not exist
      if (!canonicalURL) canonicalURL = window.location.href;
      //Assign script content. Replace current URL with the canonical URL
      ! function ()
      {
        var e = /([http|https]:\/\/[a-zA-Z0-9\_\.]+\.baidu\.com)/gi,
          r = canonicalURL,
          t = document.referrer;
        if (!e.test(r))
        {
          var n = (String(curProtocol).toLowerCase() === 'https') ? "https://sp0.baidu.com/9_Q4simg2RQJ8t7jm9iCKT-xh_/s.gif" : "//api.share.baidu.com/s.gif";
          t ? (n += "?r=" + encodeURIComponent(document.referrer), r && (n += "&l=" + r)) : r && (n += "?l=" + r);
          var i = new Image;
          i.src = n
        }
      }(window);
    })();

  </script>
  <script src="/js/local-search.js"></script>
  <script src="/.js"></script>
</body>

</html>
